网上找的一些busybox中文乱码都是改源码的方式,事实上可以通过修改配置解决中文乱码问题。
这类我用的文件系统构建工具是buildroot
进入busybox配置菜单
make busybox-menuconfig
中文支持
Settings --->
[*] Support Unicode
[*] Check $LC_ALL, $LC_CTYPE and $LANG environment variables
(63) Character code to substitute unprintable characters with
(0) Range of supported Unicode characters
[*] Allow wide Unicode characters on output
vi编辑中文支持
Editors --->
[*] vi (22 kb)
[*] Allow to display 8-bit chars (otherwise shows dots)
添加LANG环境变量
进入编译生成的文件系统 在/etc/profie 文件中添加环境变量声明
export LANG=zh_CN.UTF-8