URL:
<http://gna.org/bugs/?17068>
Summary: wmlxgettext force utf-8
Project: Battle for Wesnoth
Submitted by: udi
Submitted on: Thursday 11/11/2010 at 03:01
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Translations
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.9
Operating System: Windows XP
_______________________________________________________
Details:
With a correct UTF-8 character set on Linux, wmlxgettext reads the WML files
with UTF-8 encoding, and it also prints to the STDOUT with UTF-8. On Windows
XP however (and maybe on newer Windows systems) the default character
encoding is not UTF-8, and thus it has to be forced in the wmlxgettext
script.
Current wmlxgettext in trunk outputs the following example line on Windows
XP:
That’s a test of some UTF-8 characters, which are obligatory according
to the new style guide…
But it should be:
That’s a test of some UTF-8 characters, which are obligatory according to
the new style guide…
To solve the problem you should add the following lines to the top of
wmlxgettext (comments can be removed of course):
use utf8; # use utf8 in the script
use open IO => ':utf8'; # use utf8 for reading from files
binmode(STDOUT, ':utf8'); # use utf8 for STDOUT
That fixes the problem for Windows XP, and it keeps working on Linux. Tested
on Windows XP SP3 Hungarian and Ubuntu 10.10 with hu_HU.UTF-8. Minimal
testing scripts attached, comment out the additional utf8 lines in
wmlxgettext and launch makepot.bat on Windows to reproduce the bug.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thursday 11/11/2010 at 03:01 Name: wmlxgettext-test.zip Size: 4kB
By: udi
minimal testing scripts
<http://gna.org/bugs/download.php?file_id=11178>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?17068>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs