Phytec中国的wiki
support@phytec.cn
热线:0755-61802110-803
Page History
KERNEL支持中文编码
使用menuconfig对Linux内核进行配置,
...
Code Block | ||||
---|---|---|---|---|
| ||||
<*> Simplified Chinese charset (CP936, GB2312) │ <*> Traditional Chinese charset (Big5) <*> NLS UTF-8 |
系统支持中文语言包
在BSP的conf/local.conf文件中增加以下配置
Code Block | ||||
---|---|---|---|---|
| ||||
GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS_append = " zh-cn"
LOCALE_UTF8_ONLY="1" |
重新编译内核,镜像,开发板重新更新内核,文件系统
Code Block | ||||
---|---|---|---|---|
| ||||
bitbake linux-mainline -c comfile -f bitbake linux-mainline -c deploy bitbake phytec-qt5demo-image |
Linux 系统配置
配置系统的语言环境, 可在/etc/profile增加以下内容
Code Block | ||||
---|---|---|---|---|
| ||||
export LC_ALL=zh_CN.UTF-8
export LANGUAGE=zh_CN.UTF-8
export LANG=zh_CN.UTF-8 |
退出后, 执行sync保存, 然后重启系统即可.
测试方法
...
以上配置后, 此时就能在系统中创建中文文件和目录.
将sd卡或者U盘以utf8格式挂载在开发板上, 就能看到中文内容。将一张有中文文件的SD卡挂载在开发板上
Code Block | ||||
---|---|---|---|---|
| ||||
mkdir /mnt/mmc mount /dev/mmcblk0p1 /mnt/mmc -o utf8 ls /mnt/mmc |
...
Overview
Content Tools
Activity
Tasks