Problem with German Umlauts in block development

Permalink 1 user found helpful
I am developing a new block. The $btDescription of this block contains German Umlauts (ä, ö, ü, etc.).

When I save the PHP-document in standard ANSI format, the umlauts aren't displayed correctly when viewing the Add Functionality page.

When I save the PHP-document in UTF8 format, the display is correct. But when installing the block, I get an error message "cannot modify header information etc pp" (caused by my controller.php:1). This error doesn't occur with the ANSI version. Uninstalling the block correctly is impossible. Again, this problem doesn't occur with the ANSI version.

So it seems that concrete5 (5.4.0.5) or PHP or whoever can't handle UTF8 files correctly. But without UTF8 encoding, I won't see any umlauts... at least when it comes to block descriptions.

So what can I do to get this working 100%? I suppose this is a bug. Correct me if I'm wrong, I wish I were ;-)

Mef
 
2BitMarv replied on at Permalink Best Answer Reply
2BitMarv
Save as ANSII, but put the umlauts into a utf8_encode('somewhat')?
Mef replied on at Permalink Reply
Mef
Thanks for the tip, this works. And I thought things would get easier in an UTF8 world - silly me...

By the way, UTF8 encoding totally does the trick for the view.php, just the controller seems to be crucial...