[OWASP-ESAPI] Normalizer class import

David Hadley david.e.hadley at gmail.com
Sat Oct 25 15:27:16 EDT 2008


org.owasp.esapi.reference.DefaultEncoder imports sun.text.Normalizer
in order to be built on Java 1.4.  It appears this problem is fixed
with the release of java.text.Normalizer on Java 1.6.

An alternate solution is to include the icu4j-4_0.jar and use
com.ibm.icu.text.Normalizer on platforms 1.4.2 and above.

Code becomes:

String separated = com.ibm.icu.text.Normalizer.normalize(input,
com.ibm.icu.text.Normalizer.NFD);

License Information and platform dependencies is here:

http://source.icu-project.org/repos/icu/icu4j/tags/release-4-0/readme.html


I am brand new to the list.  I checked out the project this morning.
I don't have the 1.4.2_16 jdk to build the project as is so I
upgraded.  The compiler cried about sun.text.Normalizer so I looked
into it and this is what I found.  I thought I would share it in case
anyone was interested.

Thank you.

dh


More information about the OWASP-ESAPI mailing list