Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets
Home

[Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Kenn.Munro@xxxxxxxxxxxxxx, jdwheeler42@xxxxxxxxx, jrg45@xxxxxxxxxxxxxxxxx, pawel@xxxxxxxxxxxxxxx, per@xxxxxxxxxxx
Cc: mrproper@xxxxxxxxxx, jlangley@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#1824) ruleset data is in incompatible charsets
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 9 May 2004 21:27:59 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=1824 >

Vasco Alexandre Da Silva Costa wrote:

>>_If_ we choose utf8 for the blue encoding the gtk2 client doesn't have
>>much problems. The conversion from blue to red is a nop. xaw and gtk1
>>would have to be changed.
> 
> 
> Precisely. In your scheme, with blue, brown and red all in UTF-8
> for the current civserver + gui-gtk-2.0 client there are zero conversions.

That's true under my scheme as well.

> You only need conversions for syscalls.

My objection to Raimar's design is the hideously vast number of changes 
I believe would be required for the gtk, xaw, win32, and mui clients. 
And even more, these changes have to be maintained, and the maintainers 
won't do a good job of this.  Every string passed to libgtk must be 
converted into the locale encoding.  And it is not easy to detect 
strings that haven't been properly converted.

Just as an example:

[jdorje@devon:~/src/freeciv/freeciv/client/gui-gtk]$ grep "_(" *.c|wc -l
737
[jdorje@devon:~/src/freeciv/freeciv/client/gui-xaw]$ grep "_(" *.c|wc -l
280
[jdorje@devon:~/src/freeciv/freeciv/client/gui-win32]$ grep "_(" *.c|wc -l
614
[jdorje@devon:~/src/freeciv/freeciv/client/gui-mui]$ grep "_(" *.c|wc -l
655

Virtually all of these strings (plus many more) will need to be 
converted.  For a large but unspecified number of them the changes will 
have to be made one string at a time.

To prove me wrong I suggest someone get the GTK client to work with the 
all-unicode design.  Start with my most recent iconv patch and change 
things so the conversions are done where you want them.  Then switch to 
use a language that uses a huge number of non-ascii characters and see 
if it works.

jason




[Prev in Thread] Current Thread [Next in Thread]