Bug 14130 - Add utf-8-mac encoding to iconv
Summary: Add utf-8-mac encoding to iconv
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: locale (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 14:34 UTC by shj
Modified: 2016-10-14 01:38 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shj 2012-05-22 14:34:56 UTC
# iconv --version
iconv (GNU libc) 2.15

# iconv -l | grep UTF
ISO-10646/UTF-8/
ISO-10646/UTF8/
UTF-7//
UTF-8//
UTF-16//
UTF-16BE//
UTF-16LE//
UTF-32//
UTF-32BE//
UTF-32LE//
UTF7//
UTF8//
UTF16//
UTF16BE//
UTF16LE//
UTF32//
UTF32BE//
UTF32LE//

I wanna mount ifuse with utf-8-mac like this.
http://code.google.com/p/macfuse/issues/detail?id=139

thank you.
Comment 1 Ondrej Bilka 2013-10-09 09:01:55 UTC
This is enchancement, it would not be too hard to add support for utf-8-mac to iconv, see:

http://search.cpan.org/~tomita/Encode-UTF8Mac-0.03/lib/Encode/UTF8Mac.pm
Comment 2 Bruno Haible 2016-10-14 01:38:45 UTC
The industry-wide convention is that user-visible Unicode strings/texts are encoded in NFC form.

Only Mac OS X has the problem that its file names (not only in HFS+, but in all file systems) ought to be in Unicode 3.0 NFD form. A file name with accented characters in NFC form (that you may see through a remote mount) will be visible through 'ls' but most operations that access the file will fail.

This is a problem with Mac OS X and it needs to be solved on Mac OS X. Mac OS X has the means to solve it: see comment #30 in https://code.google.com/archive/p/macfuse/issues/139 . It relies on the "UTF-8-MAC" encoding that Apple has added to the iconv facility on Mac OS X.

You would make your global situation worse if you tried to copy this broken behaviour to a glibc system, through a 'mount' with "UTF-8-MAC" encoding. For example, 'find' and wildcards will then match unexpected files.