Re: Small Java implementation of NFC

From: Simon Josefsson (
Date: Sat Mar 19 2005 - 14:38:59 CST

  • Next message: Jony Rosenne: "RE: Incorrect names for Arabic letters"

    Elliotte Harold <> writes:

    > Currently my Java library (XOM) is dragging along a hefty chunk (344K)
    > of IBM's open source ICU just to support one rarely invoked method that
    > converts strings into NFC. I'd like to get rid of that. Given the nature
    > of my application it is more important to me to be able to eliminate the
    > extra jar file and its size, than it is to have the fastest, most
    > intelligent NFC algorithm.
    > Thus I'm looking at ways to implement NFC that don't require me to drag
    > around the Unicode data files or substantial chunks thereof.

    If you are willing to live with the limitations discussed in:

    and get a Unicode 3.2 NFKC (not Unicode 4.0 or later) implementation,
    you might be happy with the Java NFKC implementation that is part of
    GNU Libidn, contributed by Oliver Hitz. Browsable at:

    The JAR file is around 100kb, but I reckon the StringPrep/IDNA part of
    it take up from 1/3 to 1/2 of the size.

    If you'd like to optimize or extend it for your needs, and contribute
    your work back, that would be most welcome.

    Hope this help,

    This archive was generated by hypermail 2.1.5 : Sat Mar 19 2005 - 14:40:26 CST