[Freeciv-Dev] Re: (PR#9955) bug: accents in city names etc are "bad stri
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9955 >
Benoit Hudson wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9955 >
>
> On OSX, whenever an accent is sent from the server to the client, the string
> containing that accent is nuked for being a "bad string." The problem stems
> from g_convert being called with a source encoding of US-ASCII rather than
> ISO-8859-1.
>
> This patch fixes the problem by extending a hack in gui_main.c -- but it's
> just a hack.
>
> The broader question is: why is the transfer-encoding being set by the client
> based on various environment variables and hacks, independent of the
> server? If we want to be inclusive, there should be some kind of handshake
> where the client and server agree on an encoding (for instance, server sends
> a first string in ASCII containing the name of the encoding which is used
> thenceforth). Otherwise we should just hard-code the encoding to something
> like ISO-8859-1.
See PR#1824. There's a patch in there that will probably help you.
However I can't guarantee it since it sounds like Freeciv doesn't know
what your local character encoding is.
Can you tell us exactly what string is being passed to g_convert? Vasco
already has a hack
if (!strcmp(charset, "ANSI_X3.4-1968")
|| !strcmp(charset, "ASCII")) {
charset = "ISO-8859-1";
}
that is intended to detect the use of ascii (which is usually erronous)
and just use latin1 instead. But if your charset is not one of those
two strings it will of course not catch it.
jason
- [Freeciv-Dev] Re: (PR#9955) bug: accents in city names etc are "bad strings" on OSX / gtk2,
Jason Short <=
|
|