#23 charset convertion + autotools further cleanup

open
nobody
None
5
2007-05-17
2007-05-17
Jürgen
No

eBay Pages use iso8859-1 charset, while my local terminal is set to utf-8, so non-ascii auctions are display wrong (As an example see auction 300110261921).

My Patch is based on iconv, which should be available on most posix systems. I integrated an autoconf test for iconv/setlocale and also did further autotools cleanup (replaces Patch 1718317)

with kind regards,

Jürgen

Discussion

  • Jürgen
    Jürgen
    2007-05-17

  • Scott Nicol
    Scott Nicol
    2007-10-02

    Logged In: YES
    user_id=441678
    Originator: NO

    I tried this fix, but there's a problem...

    It becomes a major pain, because esniper is working in the output locale, and would then have to know about every possible output locale. For instance, 8859-1 NBSP (0xA0) becomes 0xD0 0xA0 in UTF8, 0x20 in ASCII, and who knows what in shift-JIS or whatever.

    I think a better solution is to convert input to UTF32 (or UTF16, whatever is best supported), use that internally, then output in the user's locale. That's two conversions, but it at least makes it consistent internally.

    I'll try to find some time to work on this.

     
  • Scott Nicol
    Scott Nicol
    2008-01-17

    Logged In: YES
    user_id=441678
    Originator: NO

    Another idea... work internally with 8859-1, then convert on output. Would need to change every output line.

    Changing this to a feature request.