Hello Community,
in CMSimple_XH 1.5 filenames (images, downloads etc.) with non ASCII characters cause several problems, when the server's encoding is not UTF-8: those characters are displayed wrongly in the filebrowser, and deleting these files is not possible at all. When uploading such files, they will end up with strange names in the file system.
IMHO that's not a big problem for many languages as transliteration (e.g. replacing ü with ue) can be done by the user. But for languages which don't use latin characters at all, it may well be a problem. A Taiwanese developer made even a fork of CMSimple_XH available, that caters for this issue: https://github.com/chiamingyen/CMSimple-and-plugins/.
So we may consider to convert such filenames with mb_string (at least where available).
Christoph
XH 1.6: Cater for Filenames with non ASCII Characters
XH 1.6: Cater for Filenames with non ASCII Characters
Christoph M. Becker – Plugins for CMSimple_XH
Re: XH 1.6: Cater for Filenames with non ASCII Characters
Some concrete ideas:
- There should be a configuration option in the core where a user can specify the character encoding of their file system. The option could be an xenum, filled by mb_list_encodings.
- There should be a simple API which can also be used by plugins to convert from and to UTF-8. Maybe two functions, XH_convertToFilename() and XH_convertFromFilename(), or so.
- We may consider adding fallbacks to ext/iconv and maybe ext/recode, if ext/mbstring is not available.
- We have to cater to the transparent filename conversion on Windows under PHP 7.1
Christoph M. Becker – Plugins for CMSimple_XH