| Summary: | Generated locales does not support UTF-8 encoding | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Yocto User <yoctouser> |
| Component: | core | Assignee: | Ross Burton <ross.burton> |
| Status: | RESOLVED NOTABUG | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher |
| Version: | 2.2.1 | ||
| Target Milestone: | 2.3 M4 | ||
| Hardware: | Other | ||
| OS: | arm | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Yocto User
2017-03-14 16:22:51 UTC
As suggested here: http://stackoverflow.com/questions/42784435/how-to-check-if-a-locale-is-utf-8/42797421#42797421, I've used the nl_langinfo API to detected the encoding of a locale. This is the output: ./LangInfoInspector $(locale -a) C ->ANSI_X3.4-1968 de_DE ->UTF-8 en_GB ->UTF-8 en_GB.ISO-8859-1 ->ISO-8859-1 en_US ->UTF-8 en_US.ISO-8859-1 ->ISO-8859-1 fr_FR ->UTF-8 POSIX ->ANSI_X3.4-1968 zh_CN ->UTF-8 so I confirm that en_US, en_GB and similar are UTF-8 encoded (even if there is no .utf8 suffix). I've made further tests and noticed that ISO-8859-1 locales works fine. If using en_US.ISO-8859-1 I'm able to see accented characters such as: à,è,ì,ò,ù. See below: root@imx6qsabresd:/media/win/italiano# ls -la total 12 drwxr-xr-x 3 root root 4096 Mar 13 15:11 . drwxr-xr-x 8 root root 4096 Mar 13 14:57 .. drwxr-xr-x 2 root root 4096 Mar 13 14:58 mà_però -rwxr-xr-x 1 root root 0 Mar 13 14:57 mà_però.txt The directory and file mà_però has been created under Windows. Accented à and ò are correctly displayed. Tested under PuTTY using the following settings (Change settings -> Window -> Translation): ISO-8859-1:1998 (Latin-1, West Europe) The problem is caused by the mount of the pendrive. The default mount options include: iocharset=iso8859-1, with this option the pendrive file system is interpreted as ISO 8859-1 and not UTF-8. Solved using iocharset=utf8. See: http://unix.stackexchange.com/q/352144/191458 |