[Freeciv-Dev] (PR#40227) Invalid string conversion from UTF-8 to ISO-8859-1
http://bugs.freeciv.org/Ticket/Display.html?id=40227 > > [EMAIL PROTECTED] - Sun May 04 09:50:59 2008]: > > 2008/5/4 Jason Dorje Short: > > > > This is not a bug in freeciv. If you use a non-universal character set > > on your command line then freeciv will simply be unable to display some > > characters. We can try to fudge it using transliteration but > > iconv/glibc support for that is pretty varied. The real solution is to > > use utf-8 for your command line charset. > > It might be bug that there *is* conversion to ISO-8859-1. > I though that this conversion cannot be internal encoding -> local > encoding thing. Commandline should be UTF8. It is possible that it's > not set at all in the actual Freeciv server environment launched from > cron. > > Found two uses for ISO-8869-1 in Freeciv 2.1 codebase. > 1) data encoding > 2) fallback local encoding > /* HACK: use latin1 instead of ascii in typical cases when the >* encoding is unconfigured. */ > local_encoding = "ISO-8859-1"; > > Latter probably explains my problem. > > Should we change this fallback to UTF-8 for 2.2 (S2_2) or 2.3 (TRUNK)? You can try it and see if it works. But my understanding is that when the locale is unconfigured (i.e. left at "C" in older distributions before utf-8 became standard) it's actually ascii or latin1 and any attempt to print utf-8 to the console will give garbage. If terminal software is better now and itself defaults to utf-8, then perhaps we could default there too. Perhaps it would even be possible to find the default of the terminal in that case. Or perhaps we should default just to ascii and get the transliteration to improve. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40227) Invalid string conversion from UTF-8 to ISO-8859-1
http://bugs.freeciv.org/Ticket/Display.html?id=40227 > 2008/5/4 Jason Dorje Short: > > This is not a bug in freeciv. If you use a non-universal character set > on your command line then freeciv will simply be unable to display some > characters. We can try to fudge it using transliteration but > iconv/glibc support for that is pretty varied. The real solution is to > use utf-8 for your command line charset. It might be bug that there *is* conversion to ISO-8859-1. I though that this conversion cannot be internal encoding -> local encoding thing. Commandline should be UTF8. It is possible that it's not set at all in the actual Freeciv server environment launched from cron. Found two uses for ISO-8869-1 in Freeciv 2.1 codebase. 1) data encoding 2) fallback local encoding /* HACK: use latin1 instead of ascii in typical cases when the * encoding is unconfigured. */ local_encoding = "ISO-8859-1"; Latter probably explains my problem. Should we change this fallback to UTF-8 for 2.2 (S2_2) or 2.3 (TRUNK)? - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40227) Invalid string conversion from UTF-8 to ISO-8859-1
http://bugs.freeciv.org/Ticket/Display.html?id=40227 > Marko Lindqvist wrote: > http://bugs.freeciv.org/Ticket/Display.html?id=40227 > > > A couple of invalid string conversion problems from server logs. > Server is 2.1.4 (+ unrelated local changes). Client also has reported > version 2.1.4. > > " rules the Poles." - I think the player name part is broken > here > "Lost connection: from (player )." - Same > player > > > Server side configuration: > > --disable-nls > #define HAVE_ICONV 1 > /* #undef HAVE_LIBCHARSET */ > #define HAVE_LANGINFO_CODESET 1 This is not a bug in freeciv. If you use a non-universal character set on your command line then freeciv will simply be unable to display some characters. We can try to fudge it using transliteration but iconv/glibc support for that is pretty varied. The real solution is to use utf-8 for your command line charset. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40227) Invalid string conversion from UTF-8 to ISO-8859-1
http://bugs.freeciv.org/Ticket/Display.html?id=40227 > Marko Lindqvist wrote: > http://bugs.freeciv.org/Ticket/Display.html?id=40227 > > > A couple of invalid string conversion problems from server logs. > Server is 2.1.4 (+ unrelated local changes). Client also has reported > version 2.1.4. > > " rules the Poles." - I think the player name part is broken > here > "Lost connection: from (player )." - Same > player Another note - indeed it is surely the player (leader) name that is causing the problem. Polish has a few latin-based characters that aren't available in the latin1 charset, particularly the crossed-l that appears to be used in a lot of their leader names. This *should* be transliterated easily into a simple l but last I checked glibc's iconv does not do transliteration (if you use libiconv, a separate library, it will). It's possible freeciv's handling of this failed case should be better. If we can't transliterate we should just write the semi-garbage characters to the command line anyway no doubt. The bug then becomes fairly minor. -jason ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40227) Invalid string conversion from UTF-8 to ISO-8859-1
http://bugs.freeciv.org/Ticket/Display.html?id=40227 > A couple of invalid string conversion problems from server logs. Server is 2.1.4 (+ unrelated local changes). Client also has reported version 2.1.4. " rules the Poles." - I think the player name part is broken here "Lost connection: from (player )." - Same player Server side configuration: --disable-nls #define HAVE_ICONV 1 /* #undef HAVE_LIBCHARSET */ #define HAVE_LANGINFO_CODESET 1 - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev