A problem solved a while ago, seems to be a small problem, actually solve this problem took one weeks to take the night off time, record share.
Problem Description:
In the Linux kernel configuration, the NLS (native language support) has selected the default language configuration to UTF8, and contains some other common language encoding, but the SECURECRT telnet and serial terminal display Chinese filenames are garbled.
Resolution process:
1. Initially thought is simple coding mismatch problem, modify SECURECRT in the transfer encoding from the default to UTF8, Chinese no longer garbled, but became a question mark, "??????" ;
2. Because the Chinese catalog is in the attached SD card (actually did not try the network mount or other way in the Chinese is garbled, sweat), the suspect is the wrong way to mount the SD card. Online solution All is to say, compile the kernel when the FAT file system codepage and Isochaset configuration pair, mount when select Vfat,-o command select CodePage and Isocharset match just fine, the specific command is, Mount-t Vfat-o codepage=936,iocharset=utf8/dev/mmcblk0p1/home/. Then the next few nights have been tinkering with these things, no solution;
3. One day suddenly found a blog post, said is BusyBox reason, the high version of BusyBox canceled Chinese support, unexpectedly there is this stubble. Enter the BusyBox configuration and find that Unicode support has been checked. So as prompted by the blog, you also need to modify the busybox of the other two files printable_string.c as well as unicode.c, the larger than 0x7f replaced by the question mark this selection criteria to remove the line. Look at the source code, think the place is not tick Unicode to change the ... But try it again, reconfigure the compilation busybox, replace the root filesystem, but the problem remains ...
4. Since the above hints have found that the Unicode support for Chinese is not checked, then try not to support the way Unicode display Chinese, modify Printable_ String.c and unicode.c, recompile, burn write boot device, found that remove Unicode true Chinese support, no longer display question mark;
5. But this quickie obviously does not work, that is why the check Unicode support after Chinese change question mark? That can only read the source, fortunately the range is acceptable, the problem should be in the modified two files inside.
6.last_supported_wchar, through BusyBox source code, can be found to have such a judgment if (WC > Config_last_supported_wchar) {go subset;}, while in subset place, WC is assigned to the question mark, the problem is clear, obviously this last_supported_wchar the ghost;
7. Check the BusyBox configuration and find that this macro definition represents the range of supported Unicode characters, the default value is more than 700, and the Chinese in the Unicode position to check the highest to u+2fa1d, Arbitrarily to this value changed a value greater than 2fa1d, recompile write root file system, Chinese display success!
Go a lot of detours, fortunately, the final problem is solved! Last note, BusyBox version is 1.19.4!
Arm+linux Embedded System Terminal display Chinese garbled solution