[Scilab-Dev] Test report of Chinese (or multibytes languages in general) locale mesages with Scilab 5-beta-1

Sylvestre Ledru sylvestre.ledru at inria.fr
Fri May 9 20:22:17 CEST 2008


Hello Yung-Jang,

Many thanks for your work and investigation!
Seeing Scilab translated in Chinese is a nice reward after all the time
we spend (and will spend) on the localization.

I (and probably with Vincent, the console dev) will have a look to your
problem but the solution you propose won't be possible since we do not
use the glib.

Cheers,
Sylvestre


Le samedi 10 mai 2008 à 02:03 +0800, Yung-Jang Lee a écrit :
> Hi, everybody :
> 
> I am just beginning to  translate message PO files (in Scilab
> 5-beta-1) into Chinese language (zh_TW),  and hope that will meet the
> next release schedule of Scilab 5.
> 
> To test my translation (only few PO file right now), I generated
> scilab.mo and scilab.po files in loclate\zh_TW\LC_MESSAGES with
> script  generatePoFile in directory  toos\localization after setting
> language to 'zh_TW'.
> 
> The attached files are screehshots  after startup  of Scilab  showing
> banner lines of my Chinese messages by   scilex.exe and Wscilex.exe
> respectively in Windows-XP.
> 
> The first screehshot (scilexChinese.png generated by scilex.exe )
> correctly displays Chinese characters , while the second  one
> (wscilexChinese.png by Wscilex.exe) fails.
> 
> My Windows-XP locale setting is zh_TW.BIG5 , while  messages  in
> core.po file  are in UTF-8 encoding.
> 
> It appears to me that  Windows  will transform messages back to  its
> default encoding (in my case, BIG5) and DOS console (scilex) handle
> this correctly.  But Java console expect an UTF-8  messages and the
> received  BIG5 encoding messages cause its failure in showing Chinese
> banner lines. 
> 
> I think this is not a specific problem associate with Chinese
> language, any multibytes language with  locale setting not in UTF-8
> will probable  fail in the same way.
> 
> I try to trace the source codes of Java console module to find a way
> to attack this problem.  Transform messages back to UTF-8 in
> ConsolePrint.cpp ( module console) may help , for example :
> 
> int ConsolePrintf(char *line)
> {
>   lineUtf8=localeToUtf8(line); // <------ transform back to utf8
>   CallScilabBridge::display(getScilabJavaVM(), line);
>   return 0;
> }
> 
> In this way, we need a function 'localeToUtf8'  which transform output
> strings from locale to UTF-8 encoding. This function is provided in
> Glib and may be implemented form iconv API within current Scialb
> developement environment.
> 
> Hope my test can help and looking forward for suggestions or
> instructions to attack this problems.
> 
> Best regards,
> 
> YungLee
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <https://lists.scilab.org/pipermail/dev/attachments/20080509/138c2a9a/attachment.sig>


More information about the dev mailing list