Search code examples
c++unicodeopen-sourceutf-32

What open source C or C++ libraries can convert arbitrary UTF-32 to NFC?


What open source C or C++ libraries can convert arbitrary UTF-32 to NFC?

Libraries that I think can do this so far: ICU, Qt, GLib (not sure?).

I don't need any other complex Unicode support; just conversion from arbitrary but known-correct UTF-32 to UTF-32 that is in NFC form.

I'm most interested in a library that can do this directly. For example, Qt and ICU (as far as I can tell) both do everything via an intermediate conversion stage to and from UTF-16.


Solution

  • ICU or Boost.Locale (wrapping ICU) will be your best by a very, very long way. The normalisation mappings will be equivalent with those from more software, which I assume is the point of this conversion.