I have some FAT32 devices (Rockbox firmware only supports that,
unfortunately), mounted with `mount -t msdos ...` and in them I have
many files in non-ascii filenames.  While I can see encoding inside the
files (eg: cat-ing a text file), I get mangled filenames:

% \ls _*
___ү_~1:
1985-_~1 1987-_~1 1990-_~1 1993-_~1 1996-_~1 1999-_~1

____~1:
2000-_~1 2000-_~2 2003-_~1 2008-_~1

__ٯ__~1:
1994-_~1 1997-_~1 1999-_~1 2003-_~1 2005-_~1 2008-?~1

____~1:
1981-_~1 1985-_~1 1988-_~1 1991-_~1 2005-_~1 2007-_~1 2009-2~1

etc.

I get the same behaviour on bash, zsh, ksh. The filesystem and files have
been created on a linux machine.

Is this a msdosfs bug? I see in sys/msdosfs/msdosfs_conv.c that
filenames are converted in through an ascii table, instead of passing
the raw bytes (If I am not mistaken). I don't know why 0x5f (underscore)
would be there instead. How should I begin looking to correct this?

Reply via email to