网站建议:179001057@qq.com

在开发板上增加中文环境

技术2022-05-12  3

 拷贝工具链里的i18n目录到/usr/share下; 在 /usr/lib/下建立一个locale目录,运行 localedef  -f UTF-8 -i zh_CN zh_CN.UTF8命令。 就能在/usr/lib/locale下建立一个locale-archive文件。 用locale -a命令就能看到刚才加的文件名了。 删除掉添加的文件用: localedef  --delete-from-archive zh_CN.UTF8 localedef命令是在模默认目录/usr/share/i18n下找字符集和locale定义文件的。 ~# cp i18n /us r/share ~#mkdir -p /usr/lib/locale ~#localedef -f UTF-8 -i zh_CN zh_CN.UTF8 `#locale -a 之后,还得在板子的环境变量中添加 export LANG=zh_CN.utf 详细又如: /scratchbox/compilers/arm-linux-gcc-3.4.4-glibc-2.3.5/arm-unknown-linux-gnu/share/i18n] > cd ../ [sbox-ms007: /scratchbox/compilers/arm-linux-gcc-3.4.4-glibc-2.3.5/arm-unknown-linux-gnu/share] > cp i18n/ /usr/share/ -raf [sbox-ms007: /scratchbox/compilers/arm-linux-gcc-3.4.4-glibc-2.3.5/arm-unknown-linux-gnu/share] > cd /usr/local/ [sbox-ms007: /usr/local] > ls [sbox-ms007: /usr/lib] > mkdir local [sbox-ms007: /usr/lib] > mv local locale [sbox-ms007: /usr/lib] > localedef -f UTF-8 -i zh_CN zh_CN.UTF [sbox-ms007: /usr/lib] > cd locale/ [sbox-ms007: /usr/lib/locale] > ls locale-archive [sbox-ms007: /usr/lib/locale] > locale -a C POSIX zh_CN.utf [sbox-ms007: /usr/lib/locale] > ls locale-archive [sbox-ms007: /usr/lib/locale] >


最新回复(0)