charset: add support for Unicode normalisation with libicu
authorRalph Boehme <slow@samba.org>
Tue, 9 Apr 2019 09:21:57 +0000 (11:21 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 7 Aug 2019 06:07:28 +0000 (06:07 +0000)
commit107020793c7ea44e5e776a1401bbf4f8ccb9bd85
tree26fe50c3741041ac3f2cf4ad2bfd88a2e8fef4c3
parent323f852147524b950bab4628a2824aa2273cb577
charset: add support for Unicode normalisation with libicu

This adds a direct conversion hook using libicu to perform NFC <-> NFD
conversion on UTF8 strings. The defined charset strings are "UTF8-NFC" and
"UTF8-NFD", to convert from one to the other the caller calls smb_iconv_open()
with the desired source and target charsets, eg

  smb_iconv_open("UTF8-NFD", "UTF8-NFC");

for converting from NFC to NFD.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/charset/iconv.c
lib/util/charset/wscript_build
lib/util/charset/wscript_configure