Template Encoding

My templates usually ares saved as UTF-8 (without BOM!).

This was working fine together with lucee; my german “umlauts” (ä for example) showed up fine on pages. When I switch the engine to acf2021, the special characters are messed up (my firstname “Jürg” is shown as “Jürg”. It does work when I place a on every template. Working together with ColdBox; I’ve tried to implement the statement on top of the layout page - no success. I actually don’t want to put that in every template… I’ve found somewhere, that ColdFusion tries to determine the charset of the templates itself. Unfortunately; without BOM I think cf cannot determine the right charset.
Next, I’ve tried to put
into server.json. Also… no success.

In the Lucee admin, under Settings/Charset, there are settings to change the charsets for templates, Web and Resource. If I put “UTF-8” in “Web charset”; it works - for Lucee. Unfortunately I cannot find anything like that in the acf-admin.
Any ideas how I can get around that template charset stuff?

Have you tried putting

	processingdirective pageEncoding='UTF-8';

at the top of those pages. That’s how I’ve always dealt with unicode chars.

Actually, yes, I’ve tried this (forgot to mention in my previous post; I was starting the sentence "It does work when I place a "… there I should have mentioned the “processingdirective”).
But I don’t want to put this statement on every template… it would be a much better way to put it somewhere ONCE server side (as it’s possible in lucee); or maybe somewhere within coldbox (it doesnt’t work if I put it on top of the layout template)

I’d file a ticket with Lucee or discuss it on the Lucee discourse forum then. So far as I know, that’s what Lucee requires. Either way, this really isn’t a CommandBox question :slight_smile:

Actually, it would be an ACF-Issue, not a Lucee one, because on Lucee there IS a setting in the administrator where global encoding can be set. Unfortunately there’s none in the acf-admin. It sais that acf tries to recognize the charset itself…
Or maybe it can be done with coldbox? But anyway, then it would be a coldbox issue not a commandbox one, right.

Sorry, I said that backwards. It’s an Adobe issue :slight_smile: ColdBox doesn’t have any control over this-- the CF engine is responsible for loading the templates.