Localization for Windows Multilanguage

Yung-Jang Lee yjlee123 at gmail.com
Fri Jan 30 05:20:44 CET 2009


Sylvestre  and all,

Allan reported a  localization bug for Windows  Multilanguage
environment ( http://lists.scilab.org/cgi-bin/ezmlm-browse?list=dev&cmd=showmsg&msgnum=1169
).

This bug is not easy fixed with current Prequirements, for the GETTEXT
library is too old and lack function I needed for a patch.

I just fixed this bug with a new  Prequirements library for  iconv.dll
,GNU_gettext.dll. Attached is the patch for Scilab as well as
Prequirements libraries.

There is a ReadMe file in  'src' directory of the Prequirements patch,
that describe how to create these libraries.


The reason to update the Prequirements  libraries is,

   The output string of  'gettext'  provided by current Prequirements
(GNU_gettext.dll) is fixed to system installed  encoding. If user
change default language in Scilab or select other language form the
"Regional and Language options" in control panel Windows,  the outputs
 of 'gettext'   are  unpredictable. Some of them are in unconverted
UTF8 format and some of them being  badly converted to unrecognized
strings.

We need a 'gettext' version that always return  UTF8 string.
According to documentation of GNU gettext library, this can be
provided with function  'bind_textdomain_codeset'. I just to set
output encoding to "UTF-8" as

             bind_textdomain_codeset ('scilab',"UTF-8");

and "gettext"  , "dgettext"  will always return string in UTF-8
format. With this way, I don't need to wrap 'gettext' with
'localeToUTF'.

But GNU_gettext  in Prequirements  is too old to have function
'bind_textdomain_codeset' , I need to  update it,

I had test this patch with Chinese-Traditional(zh_TW) Windows Xp with
default language set to   "fr_FR","zh_CN" and "ru_RU". Scilab's
localization  function work well in this tests.


Best regards,

Yung-Jang Lee
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prerequirementsForGettextAndIconv.zip
Type: application/zip
Size: 1288744 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090130/7694c80b/attachment.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gettext.diff
Type: text/x-patch
Size: 6992 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090130/7694c80b/attachment.bin>


More information about the dev mailing list