I see many answers that are replied by other people,and i do the same things that they say,but it is useless,how to support chinese in yocto,the attach is the way to support chinese whitch is useless.
Now,It shows ???? when I use ls commond,but It is ok when I usb vi or cat.
解決済! 解決策の投稿を見る。
Please use the attached file to replace sources/poky/bitbake/lib/bb/utils.py, which have already applied the patch https://patchwork.openembedded.org/patch/122361/.
Please add the following in sources/meta-freescale/recipes-fsl/images/fsl-image-core.bb
GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS = "zh-cn"
LOCALE_UTF8_ONLY="1"
The regenerate rootfs filesystem with "bitbake fsl-image-core".
Please refer to the following on the target board.
root@t2080rdb:~# locale -a
C
zh_CN
POSIX
root@t2080rdb:~# export LANG=zh_CN.UTF-8
root@t2080rdb:~# export LC_ALL=zh_CN.UTF-8
root@t2080rdb:~# locale
Thanks,
Yiping
I solved it,set LC_COLLATE will be wrong,so I only set LC_CTYPE,It is ok.
Please use the attached file to replace sources/poky/bitbake/lib/bb/utils.py, which have already applied the patch https://patchwork.openembedded.org/patch/122361/.
Please add the following in sources/meta-freescale/recipes-fsl/images/fsl-image-core.bb
GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS = "zh-cn"
LOCALE_UTF8_ONLY="1"
The regenerate rootfs filesystem with "bitbake fsl-image-core".
Please refer to the following on the target board.
root@t2080rdb:~# locale -a
C
zh_CN
POSIX
root@t2080rdb:~# export LANG=zh_CN.UTF-8
root@t2080rdb:~# export LC_ALL=zh_CN.UTF-8
root@t2080rdb:~# locale
Thanks,
Yiping
I do the things as you say,but the filesystem will be wrong.
.....................................................................................................................
ls1046ardb login: root
root@ls1046ardb:~# locale -a
C
POSIX
zh_CN
root@ls1046ardb:~# export LANG=zh_CN.UTF-8
root@ls1046ardb:~# locale
locale: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
Aborted
root@ls1046ardb:~# export LC_ALL=zh_CN.UTF-8
root@ls1046ardb:~# locale
locale: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
Aborted
root@ls1046ardb:~# ls
ls: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
Aborted
root@ls1046ardb:~# export LC_ALL=C
root@ls1046ardb:~# ls
???????????????
root@ls1046ardb:~# locale
LANG=zh_CN.UTF-8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
root@ls1046ardb:~# export LC_ALL=zh_CN.UTF-8
root@ls1046ardb:~# locale
locale: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed.
Aborted
root@ls1046ardb:~#
................................................................................................................
I can't set the LC_ALL and LANG as zh_CN.UTF-8 ,how to solve it?