[Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx> writes:
> On Sat, 22 Jun 2002, SAWADA Katsuya wrote:
>
>>
>> OS: Debian GNU/Linux woody + sid (i386)
>> libgtk1.2 1.2.10
>> LANG=ja_JP.eucJP
>>
>> After I send mail about connection dialog, I found another font problem.
>>
>> I can't read freeciv_motto, "'Cause civilization should be free!" on
>> main graphic in Japanese. First, I checked graphics.c/load_intro_gfx,
>> and found main_font has problem. main_font is currently font, but we
>> need fontset. Because Japanese use not only ascii character set, but
>> also use jisx0208.
>>
>>
>> I amn't using gtk-2.0 nor xaw, so I don't know whether they have or
>> not.
>
> The GTK+ 2.0 client should work fine since it uses Pango and Unicode but,
> as you noticed, I hacked that code a bit so the error messages will be wrong.
> I also hardcoded the fonts in the code, which is never good, but as Sans
> and Serif are guaranteed to exist that should be ok.
I compiled client with GTK+ 2.0, and tested the client.
I couldn't read messages in japanese expect GTK+ 2.0 themselevs
messages "_Quit" and "_Jump to" on connection dialog.
The problem looks like character encoding.
I (and mostly 100% Japanese) am using LANG=ja_JP.eucJP, but Pango
looks take only UTF-8 encoding.
I executed civclient with LANG=ja_JP.UTF-8, then it works good. Now I
can read Japanese message on the dialog. But, client also output UTF-8
character to terminal emulator. It is not important to read console
message, but problem.
Here is what I can't read.
1: Cannot find audio spec-file "stdsounds.spec".
1: To get sound you need to download a sound set!
1: Get sound sets from <ftp://ftp.freeciv.org/freeciv/contrib/sounds/sets>.
1: Will continue with disabled sounds.
I'm thinking two models to solve this problem.
Terminal encoding: You like encoding
Freeciv Internal: UTF-8
Pango, Gtk+ 2.0: UTF-8
or
Terminal encoding: You like encoding
Freeciv Internal: You like encoding
Pango, Gtk+ 2.0: UTF-8
First model do translate to UTF-8 when program call gettext. Message
is passed to Pange without change. When program output to terminal,
message was translate to their own encoding from UTF-8.
Problem is we have to think about where to messages should go.
fprintf(stderr, _("Unrecognized option: \"%s\"\n"), argv[i]);
don't need translate to UTF-8. Same problem has freelog. So we may
need to have special macro like N_, and change many source code.
Second model do translate to UTF-8 when message pass to Pango.
I feel it is simple.
I lack of knowledge Freeciv core code especially client-server packet,
so it is not sure. But, I suppose first model is good because Freeciv
use client-server model and first model is we can connect same server
with various client using each language.
--
SAWADA Katsuya
- [Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606), Vasco Alexandre Da Silva Costa, 2002/06/23
- [Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606), Vasco Alexandre Da Silva Costa, 2002/06/24
- [Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606), Ben Webb, 2002/06/25
- [Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606), Vasco Alexandre Da Silva Costa, 2002/06/25
- [Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606), Vasco Alexandre Da Silva Costa, 2002/06/25
- [Freeciv-Dev] Re: main map have gtk1.2 font problem (i18n) (PR#1606), Vasco Alexandre Da Silva Costa, 2002/06/25
|
|