[Scilab-Dev] Localization for Windows Multilanguage
Allan CORNET
allan.cornet at scilab.org
Fri Jan 30 08:25:06 CET 2009
Hi,
Please notice that on current master, with Sylvestre and Antoine modifications
http://bugzilla.scilab.org/show_bug.cgi?id=4005
http://gitweb.scilab.org/?p=scilab;a=commit;h=67660b64ac3914055233035fa1ee3c04eaa41ed4
I have no more this problem with menus grayed.
I checked with this version: http://www.scilab.org/download/dailyDownload.php?filename=scilab-master-1233250238.exe&date=2009-01-30
Current version used by scilab of libintl for Windows is 0.14.
This version was built with Visual studio 2008 for x86 and x64.
I will update libintl to 0.17 for scilab 5.2
(quickly on master)
Thanks you for your help
Best regards
Allan
-----Message d'origine-----
De : Yung-Jang Lee [mailto:yjlee123 at gmail.com]
Envoyé : vendredi 30 janvier 2009 05:21
À : Scilab dev list; Sylvestre Ledru; Allan CORNET
Objet : [Scilab-Dev] Localization for Windows Multilanguage
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
More information about the dev
mailing list