-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eu-gene,

On 3/2/12 1:34 AM, Eu-gene Chung wrote:
> I'm doing porting Jasper of Tomcat 7 to our product.
> 
> I was adding 'UTF-32' mappings to the 
> org.apache.jasper.xmlparser.EncodingMap#fIANA2JavaMap
> 
> when I found that there were some unmatched mappings compared to 
> http://docs.oracle.com/javase/6/docs/technotes/guides/intl/encoding.doc.html.
>
> 
> 
> Referring to that Java SE 6 document,
> 
> fIANA2JavaMap.put("UTF-16BE",           "UnicodeBig"); 
> fIANA2JavaMap.put("UTF-16LE",           "UnicodeLittle");
> 
> should be
> 
> fIANA2JavaMap.put("UTF-16BE",           "UnicodeBigUnmarked"); 
> fIANA2JavaMap.put("UTF-16LE",           "UnicodeLittleUnmarked");

The only difference is whether there is a BOM in the document, which
has IMO little to do with the encoding itself.

That code is only used in XMLEncodingDetector which returns
UTF-16BE/LE regardless of whether the BOM is present. One could argue
that UnicodeLittle really maps to "x-UTF-16LE-BOM" and that UnicodeBig
doesn't map to anything.

Is this actually causing some type of observable problem? If so,
please file a bug report in bugzilla (and include a patch, since
you've already done the work). Only do this if you can demonstrate
some kind of real problem and not just something you noticed:
otherwise, "fixing" it might end up breaking things for a lot of people.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9U4KcACgkQ9CaO5/Lv0PD3ugCeNKoj1yIWu5Ogp14HgUlCuGTc
NQkAn39i8dlFK00pHAGUeXXMWcogWn15
=05dN
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to