exfat icon indicating copy to clipboard operation
exfat copied to clipboard

Support for other character sets than UTF

Open feanor80 opened this issue 6 years ago • 2 comments

I noticed that the exfat implementation does not work in environments with different character encodings than UTF-8, e.g. ISO-8859-1. It ignores mount option iocharset in comparison to its counterpart implementation for vfat file systems, if I understand correctly.

How to reproduce: Open a terminal, set character encoding to ISO-8859-1 and type the following:

$ export LC_ALL=en_US.ISO8859-1
$ mount -o iocharset=iso8859-1 <device> <path>
$ cd <path>
$ touch Ä
touch: cannot touch 'Ä': Invalid or incomplete multibyte or wide character

While I understand that UTF-8 should be the standard today, it would probably be nice to have full support for legacy systems.

feanor80 avatar Oct 26 '18 23:10 feanor80

You are right, fuse-exfat never supported anything but UTF-8 (iocharset option is ignored).

It would indeed be nice if someone implemented support for other encodings. :)

relan avatar Oct 27 '18 04:10 relan

Hi there,

There is something called "Latin-1 Supplement":

https://www.wikidata.org/wiki/Q574509

If you convert those characters to proper UTF-8 codes first, then they will in turn be converted to proper UTF-16 codes, which I think is what Ex-fat is using. Maybe this is also a shell issue / c-locale enviroment issue.

Beware that some common OS'es, like recent MacOS (Monterey at least) may stop showing all such files and directories, depending on the character code. They will go totally invisible, but still exist in the file system, but to no avail.

--HPS

hselasky avatar Dec 15 '22 12:12 hselasky