DbaseFileReader uses charset's display name instead of canonical name, which
fails on non Sun JVMs
--------------------------------------------------------------------------------------------------
Key: GEOT-1688
URL: http://jira.codehaus.org/browse/GEOT-1688
Project: GeoTools
Issue Type: Bug
Components: data shapefile
Affects Versions: 2.5-M0, 2.4-RC0
Reporter: Gabriel Roldán
Assignee: Jesse Eichar
Fix For: 2.4-RC1, 2.5.0
In {{DbaseFileReader}}, {{Charset.displayName()}} is being used instead of
{{Charset.name()}}.
This happens to work on Sun JVM's by accident, as displayName() is returning
the same value than name(), but fails on IBM VM for one.
The fix is to replace:
{code}
if(!stringCharset.displayName().equals("ISO-8859-1"))
s = new String(s.getBytes("ISO-8859-1"), stringCharset.displayName());
{code}
by
{code}
if(!stringCharset.name().equals("ISO-8859-1"))
s = new String(s.getBytes("ISO-8859-1"), stringCharset.name());
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel