[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
Thu May 29 17:20:10 CEST 2008
Hello Yung-Jang,
I haven't forget you. Just busy on other stuff.
Note that I am working under Linux Debian with only-required-packages
(understand: I am not sure to have all the font for the traditionnal
chinese language).
After playing with internal & external bugs, I have been able to
reproduce your bug and to fix it (you can call it a workaround)
When I launch this way:
# LANG=zh_TW ./bin/scilab
I get "you-failed.jpg"
but when I launched it with:
# LANG=zh_TW.UTF-8 ./bin/scilab
I get "Working.jpg"
Does it mean anything to you ?
(for those who don't know, Java is full Unicode)
Is there zh_TW charset which would not be UTF-8 ?
Sylvestre
> 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: Working.jpg
Type: image/jpeg
Size: 56642 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20080529/66d03b5e/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: you-failed.jpg
Type: image/jpeg
Size: 47463 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20080529/66d03b5e/attachment-0001.jpg>
More information about the dev
mailing list