Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 2.1 KB

README.md

File metadata and controls

68 lines (55 loc) · 2.1 KB

GNU libiconv with UTF-8-MAC support (Port from Apple's GNU libiconv)

Works

  • Base source: GNU libiconv 1.17
  • UTF-8-MAC support: Apple libiconv-51.200.6 (utf8mac.h)
  • My UTF-8-MAC works:
    • Port to Linux, Solaris, AIX
    • Support surrogate pairs
    • Fix bugs

Building libiconv program and libraries from the Git repository

On Debian or Ubuntu system:

$ sudo apt install gcc make autoconf automake gperf gettext groff gnulib git
...
$ git clone https://github.com/fumiyas/libiconv-utf8mac.git
...
$ cd libiconv-utf8mac
$ git rev-parse --abbrev-ref @ # Note: Check if the current tree is `utf-8-mac-*`
utf-8-mac-51.200.6.libiconv-1.17
$ make -f Makefile.utf8mac autogen
...
$ ./configure
...
$ make
...
$ sudo make install
...
$ /usr/local/bin/iconv -l |grep UTF-8-MAC
UTF-8-MAC UTF8-MAC

Make a libiconv source tar ball

$ make -f Makefile.utf8mac dist
...

Note

UTF-8-MAC is a NFD-like normalization form, not the NFD!!!!

Original UTF-8-MAC NFD
福 (U+FA1B) 福 (U+798F)
神 (U+FA19) 神 (U+795E)
づ (U+3065) づ (U+3064 U+3099)
け (U+3051)

TODO

  • Add UTF-8-NOMAC encoding (NFC-like normalization form)