DbaseFileReader in 2.5-m3 break multibyte chars -----------------------------------------------
Key: GEOT-1950 URL: http://jira.codehaus.org/browse/GEOT-1950 Project: GeoTools Issue Type: Bug Components: data shapefile Affects Versions: 2.5-M3 Reporter: Wind Li Assignee: Jesse Eichar The line which cause this issues are: String s = charBuffer.toString(); // to support some foreign languages, such as Chinese, we have // to convert // from ISO-8859-1 to a user provided charset if (!stringCharset.name().equals("ISO-8859-1")) s = new String(s.getBytes("ISO-8859-1"), stringCharset.name()); // this resets the limit... Actually these are not necessary and it's the source of issues. s = new String(s.getBytes("ISO-8859-1"), stringCharset.name()) will cause we lost all non-ansi chars. remove two lines: if (!stringCharset.name().equals("ISO-8859-1")) s = new String(s.getBytes("ISO-8859-1"), stringCharset.name()); will make geotools works with chinese chars. -- 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel