Karol 'grzywacz' Nowak | 3 Aug 14:57 2006
Picon

Tiny gui


Hi everyone!

I'm about to start making changes to the tiny gui functionality, to make
it usable again. Most of the changes will be inside the appropriate
#ifdef blocks, so it's unlikely that I'll break something outside of
that. ;-)

If anyone has some time to review my commits, please do so. :)

--
pozdrawiam
Karol 'grzywacz' Nowak
-> Jabber: grzyw <at> jabber.org
-> WWW: http://jabba.pl/grzywacz
Nobuhito Okada | 4 Aug 05:07 2006
Picon

Windows filename conversion

Hello, everyone,

We Japanese people have been having a trouble with save data on Windows.
(Only the name is corrupt, the contained data is okay.)

On Wesnoth, the chapater names in Japanese are encoded in UTF-8, and when these
games are saved, the filenames are corrupt because only
ShiftJIS-encoded filenames
are supported on Japanese Windows.
I guess, maybe European characters have no problem yet but other Asian languages
(like Chinese and Korean) would have the same problems.

I have looked into this and found that ANSI-encode filenames should be used on
Windows, and the standard Windows APIs called MultiByteToWideChar() and
WideCharToMultiByte() can be easily used for the conversion.

I have also looked into the Wesnoth codes and the std::replace() are
used for the
filename conversion between a space(' ') and a underline('_') in
src/gamestatus.cpp.
I assumed ANSI-UTF8 conversion can be applied at the time, then my test code
works fine. (built with mingw32, confirmed on Japanese WindowsXP)
http://www.wesnoth.org/wiki/JapaneseTranslation#Testing_Archives
Wesnoth-1.1.8+svn-20060804.win32.zip

Now I would like you to get this change involved into the game officially.
Please check the patch attached here.

This change affects only the Windows binary.
I'm not sure if this is required by the other languages than Japanese, but
(Continue reading)

Jérémy Rosen | 4 Aug 19:47 2006
Picon
Picon

Re: Windows filename conversion

quick answer, because I can't look at it right away...

the idea sounds good, so will probably be included (in 1.2 too since 
it's obviously a bugfix)

I'll reread it this WE, stay tuned

I've seen you've already opened a patch... great, thx a lot
Boucman

Nobuhito Okada wrote:
> Hello, everyone,
> 
> We Japanese people have been having a trouble with save data on Windows.
> (Only the name is corrupt, the contained data is okay.)
> 
> On Wesnoth, the chapater names in Japanese are encoded in UTF-8, and 
> when these
> games are saved, the filenames are corrupt because only
> ShiftJIS-encoded filenames
> are supported on Japanese Windows.
> I guess, maybe European characters have no problem yet but other Asian 
> languages
> (like Chinese and Korean) would have the same problems.
> 
> I have looked into this and found that ANSI-encode filenames should be 
> used on
> Windows, and the standard Windows APIs called MultiByteToWideChar() and
> WideCharToMultiByte() can be easily used for the conversion.
> 
(Continue reading)

Nobuhito Okada | 5 Aug 16:41 2006
Picon

Re: Windows filename conversion

Thank you very much, Boucman !

> r12997 | boucman | 2006-08-05 18:30:16 +0900 (Sat, 05 Aug 2006) | 1 line
> Changed paths:
>    M /branches/1.2/changelog
>    M /branches/1.2/src/gamestatus.cpp
>
> fix UTF8 names under windows, however I don't have windows myself, so please test that > you can still save
and load correctly in particular in japanese

OK!
I have confirmed the latest check-out from SVN (1.2 branch). Saving,
listing and loading files in Japanese are working fine.
It's available from here:
http://www.wesnoth.org/wiki/JapaneseTranslation#Testing_Archives
Wesnoth-1.1.8+svn-20060804.win32.zip

Although, this one which has been built on Linux with mingw32
cross-compiler, cannot choose the other languages than Japanese (the
system language).
I don't know why, maybe library problems or something.
Hoping someone else to check this in other languages.

okyada
Nobuhito Okada | 8 Aug 04:01 2006
Picon

Re: Windows filename conversion

2006/8/5, Nobuhito Okada <okyada <at> gmail.com>:
> Although, this one which has been built on Linux with mingw32
> cross-compiler, cannot choose the other languages than Japanese (the
> system language).
> I don't know why, maybe library problems or something.

I replaced some libraries (libintl3.dll / libiconv.dll) with those
which are included in the official Windows binary (intl.dll /
iconv.dll).  Then, it can successfully change the language within the
game.

I also tried to display Korean and some modifications were needed.

- data/languages/ko_KO.cfg
The locale "ko_KO" is included but ko_KR is correct, isn't it?
(like ja_JP, which is japanese_JAPAN, korean_KOREA)
and the character for "Korean" doesn't look UTF-8 characters. I have
prepared a ko_KR.cfg myself.  Then now it looks fine on Linux.

- data/fonts.cfg
I read a description at http://www.wesnoth.org/wiki/WesnothAsianLanguages .
I couldn't find a font named YDIYGO120.ttf but found an opensource
font called UnBatang.ttf in Debian ttf-unfonts package.  I installed
the font, copied it to the Wesnoth/fonts folder and modified
wesnoth/ko.po, then I can see Korean messages in the Wesnoth on
Windows.
This is the screenshot:
http://wesnoth.homeip.net/wesnoth-korean.png

and the binary here:
(Continue reading)

Nobuhito Okada | 8 Aug 13:33 2006
Picon

Re: Windows filename conversion

2006/8/8, Nobuhito Okada <okyada <at> gmail.com>:

> Back to the file conversion testing,
> I tried saving games played in different languages, and found some
> conversion problem.
> Especially, saving Chinese-chapter game failed on my Japanese Windows,
> while the previous version can save it although the filename is
> corrupt on filesystem.

I have tested saving and loading on Windows in different languages
(English/Japanese)
Saving some languages failed in different system languages.
This could harm people who are playing the Wesnoth in their language
on Window in the different language.

The current results are following:
+---------+--------------+-------------+----+----+---------+-----------+
|Wesnoth  |Windows System|Game(chapter)|    |    |Save name|Filename in|
|Version  | Language     |Language     |Save|Load|in game  |filesystem |
+---------+--------------+-------------+----+----+---------+-----------+
|1.1.8    |   English    |   English   | ok | ok |   ok    |    ok     |
+---------+--------------+-------------+----+----+---------+-----------+
|1.1.8    |   English    |   Deutsch   | ok | ok |   ok    | (corrupt) |
+---------+--------------+-------------+----+----+---------+-----------+
|1.1.8    |   English    |   Japanese  | ok | ok |   ok    | (corrupt) |
+---------+--------------+-------------+----+----+---------+-----------+
|1.1.8    |   English    |   Chinese   | ok | ok |   ok    | (corrupt) |
+---------+--------------+-------------+----+----+---------+-----------+
|1.1.8    |   English    |   Korean    | ok | ok |   ok    | (corrupt) |
+---------+--------------+-------------+----+----+---------+-----------+
(Continue reading)

Elias Pschernig | 13 Aug 22:35 2006
Picon

Should sample.py be in 1.2?

I was just wondering, should I commit the sample.py from trunk also
into 1.2? It's not a bug fix, but it also shouldn't cause any
problems. There simply would then be an example python AI included
with 1.2.
Lars Næsbye Christensen | 14 Aug 02:12 2006
Picon

DejaVu Sans 2.9 and Mac key glyphs

Dear Wesnoth dev,

Following a previous mail (some months ago), I'd like to inform you  
that DejaVu Sans is now in version 2.9, adding support for Hebrew as  
well as a lot more glyphs and fixes since the version currently  
shipping with Battle of Wesnoth.

Also, we had a discussion about the Command and Option key glyphs in  
the Mac version. Is there a way to replace 'cmd' and 'opt', then I'd  
love to do it and send the patch, but I'm not much familiar with the  
code.
I talked to Jetryl about it and he suggested I mailed you again about  
it.

Regards,

Lars Næsbye Christensen
David Philippi | 14 Aug 02:18 2006
Picon

Re: DejaVu Sans 2.9 and Mac key glyphs

Am Montag 14 August 2006 02:12 schrieb Lars Næsbye Christensen:
> Following a previous mail (some months ago), I'd like to inform you
> that DejaVu Sans is now in version 2.9, adding support for Hebrew as
> well as a lot more glyphs and fixes since the version currently
> shipping with Battle of Wesnoth.

Actually you're a little late, went into SVN some minutes ago. ;-)

Bye David
Isaac Clerencia | 14 Aug 08:03 2006
Picon

Re: Should sample.py be in 1.2?

On Sunday 13 August 2006 22:35, Elias Pschernig wrote:
> I was just wondering, should I commit the sample.py from trunk also
> into 1.2? It's not a bug fix, but it also shouldn't cause any
> problems. There simply would then be an example python AI included
> with 1.2.
I think it's ok to commit it to 1.2.

Best regards

Gmane