Menu

#27 Geoinfo / Encoding

open
nobody
None
5
2009-07-26
2009-07-26
Joshua Hopp
No

I had encoding problems with geoinfo data retrieved from geonames. Foreign letters like é or î and all text behind were cut off. (I tried to read the tags with several programmes, same result). However, manually specified geoinfo worked well.

I ended up adding an --charset option which allows choosing the encoding (don't know if this works with other charsets than utf-8).
On my system this works fine.

Greets.

Attachement: The changes I made to version 1.149 2008/09/13 07:33 as a patch file.

Discussion

  • Joshua Hopp

    Joshua Hopp - 2009-07-26

    Patch to version 1.149 2008/09/13 07:33

     
  • Nobody/Anonymous

    I'm using Japanese. The default code displays fine in my terminal (Apple Terminal.app) but doesn't embed properly into my files.

    When I apply the patch, neither the terminal display or the file display properly.

    The strange thing is when I change the patched encoding to "iso-8859-1" the terminal display is correct again but of course the file is wrong like before. The string in question is "日本" (two kanji for ni-hon). It becomes "??"

    I tried "shiftjis" and "eucjp" with no luck.

    I use exiftool for inputting Japanese text all the time, so I know it can work. Exiftool is UTF8 by default, too.

    I'll keep trying things.

     
  • Uwe Girlich

    Uwe Girlich - 2009-10-23

    Sorry for answering late. Real life can be absorbing...

    I'm not really sure if your patch is the right way for this problem. Geonames is a web site and they might use HTML entities for foreign letters. And you only use the function call "encode", which means to convert form the Perl internal representation (whatever that might be after parsing a bit of a web page) into the desired output format. I have to think a bit more about all this first.

     
  • Erik Kunze

    Erik Kunze - 2011-12-11

    The encoding problem still persists. I tagged fotos from Viet Nam and most of the special chars are wrong.

     

Log in to post a comment.

MongoDB Logo MongoDB