[Buildroot] User question UTF-8

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Sep 15 21:21:41 UTC 2015


Dear Steve Calfee,

On Tue, 15 Sep 2015 10:11:56 -0700, Steve Calfee wrote:

> I am trying to port a python application to buildroot/busybox. It
> needs to read disk files from removable drives. The filenames may
> contain utf-8 chars.

Are you actually sure they are UTF-8 encoded? I don't think characters
in FAT16/32 filesystems are typically encoded as UTF-8, but rather some
weird Windows-specific code page encoding.

According to
https://msdn.microsoft.com/en-us/library/windows/desktop/dd317748(v=vs.85).aspx:

"""
NTFS stores file names in Unicode. In contrast, the older FAT12, FAT16,
and FAT32 file systems use the OEM character set. For more information,
see Code Pages.
"""

> Currently ls from busybox prints ? for the utf-8 non-ascii chars. Both
> from console on minicom and from ssh (which should handle utf-8).

Can you instead try if a UTF-8 encoded text file prints correctly? If
it does, then the problem is really more of a filesystem character
encoding issue than a problem in the UTF-8 support.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list