Menu

#2 Character encoding problem

open
nobody
None
5
2008-12-12
2008-02-13
theli
No

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

Discussion

  • theli

    theli - 2008-02-13
     
  • zl25-drexel

    zl25-drexel - 2008-03-10

    Logged In: YES
    user_id=1763579
    Originator: NO

    cool, thanks
    the patch will be applied in 1.4.2 release

     
  • zl25-drexel

    zl25-drexel - 2008-03-10
    • status: open --> closed
     
  • theli

    theli - 2008-12-12
    • status: closed --> open
     
  • Brabenetz Harald

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.