I am hosting a Danish TYPO3 site and I had the issue that the local charset inside PHP was not correctly being applied.
It turned out that I had to enable the Danish charset from the Linux shell. I enable the Danish charset by running the following command:
localedef -f UTF-8 -i da_DK -c da_DK.UTF-8
export LANG=da_DK.UTF-8
Explanation localedef command
Section | Description |
---|---|
localedef | A utility to compile locale definition files. |
-f UTF-8 | The file that defines the character set that is used by the input file. In our case UTF-8. |
-i da_DK | The locale definition file to compile. da_DK is the official code for Danish. |
-c | Write the output files even if warnings were generated about the input file. This will force overwriting, so be careful. |
da_DK.UTF-8 | Output file. da_DK.UTF-8 is the official name to use inside PHP to enable the Danish locale. |