Character encoding problem
Brought to you by:
zl25-drexel
The response body is not read properly because
|> IOUtils.toString(get.getResponseBodyAsStream());
is uses which uses the default character encoding of the platform. Therefore e.g. german umlauts were not read properly.
The fuction call should be changed to:
|> IOUtils.toString(get.getResponseBodyAsStream(),get.getResponseCharSet());
See: GeoGoogleCharsetPatch.txt
Regards,
Martin
Logged In: YES
user_id=1763579
Originator: NO
cool, thanks
the patch will be applied in 1.4.2 release
Hi,
due to the last commit to the GeoAddressStandardizer (see [1]) the "get.getResponseCharSet()" was transformed to a "get.getRequestCharSet()" and therefore the encoding of the response is done wrong for german umlauts now.
Could you change this back to use the response-charset to generate the String? Thank you!
Regards,
Martin
[1] http://geo-google.svn.sourceforge.net/viewvc/geo-google/geoGoogle/geoGoogle/src/main/java/geo/google/GeoAddressStandardizer.java?r1=97&r2=108
Hi,
I have the same Problem. The Patch above is right, but the current Implementations (1.4.2, 1.4.3, 1.5.0, trunk) uses a variation of the patch. The "get.getResponseCharSet()" was transformed to a "get.getRequestCharSet()". So it doesn't work.
Could you change the Line 259:
http://geo-google.sourceforge.net/xref/geo/google/GeoAddressStandardizer.html#259
to "get.getResponseCharSet()" instead of "get.getRequestCharSet()"?
Regards,
Harald