Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] NFC serialization

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] NFC serialization
  • Date: Wed, 22 Oct 2003 12:39:27 -0400

At 2:11 PM -0400 10/20/03, Elliotte Rusty Harold wrote:

What do people think of

public void setUnicodeNormalizationFormC(boolean useNFC)
public boolean getUnicodeNormalizationFormC()

It's a little long, but it's clearer to developers who aren't accustomed to working with the arcana of Unicode. And it follows the customary Java principle of don't abbreviate.

I think the alternative is John Cowan's suggestion of

public void setUnicodeNFC(boolean useNFC)
public boolean getUnicodeNFC()

The other possibility is to actually support all four normalization forms, and do something like this:

public void setUnicodeNormalization(Type form)
public String getUnicodeNormalization()

However, I'm not sure that's actually a good idea. It goes against the W3C character model which suggests NFC or nothing However, there *might* be some use cases for NFKC in particular.

--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page