Also,<br><br>Under Windows, it's not as easy as Linux to switch locale just by setting LANG. And most Chinese users use Scilab under Windows, so I must face to the problem not just workaround.<br><br>YungLee<br><br>
<div class="gmail_quote">2008/5/29 Sylvestre Ledru <<a href="mailto:sylvestre.ledru@inria.fr">sylvestre.ledru@inria.fr</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Yung-Jang,<br>
<br>
I haven't forget you. Just busy on other stuff.<br>
<br>
Note that I am working under Linux Debian with only-required-packages<br>
(understand: I am not sure to have all the font for the traditionnal<br>
chinese language).<br>
<br>
After playing with internal & external bugs, I have been able to<br>
reproduce your bug and to fix it (you can call it a workaround)<br>
<br>
When I launch this way:<br>
# LANG=zh_TW ./bin/scilab<br>
I get "you-failed.jpg"<br>
<br>
but when I launched it with:<br>
# LANG=zh_TW.UTF-8 ./bin/scilab<br>
I get "Working.jpg"<br>
<br>
Does it mean anything to you ?<br>
(for those who don't know, Java is full Unicode)<br>
<br>
Is there zh_TW charset which would not be UTF-8 ?<br>
<font color="#888888"><br>
Sylvestre<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
> Hi, everybody :<br>
><br>
> I am just beginning to translate message PO files (in Scilab<br>
> 5-beta-1) into Chinese language (zh_TW), and hope that will meet the<br>
> next release schedule of Scilab 5.<br>
><br>
> To test my translation (only few PO file right now), I generated<br>
> scilab.mo and scilab.po files in loclate\zh_TW\LC_MESSAGES with<br>
> script generatePoFile in directory toos\localization after setting<br>
> language to 'zh_TW'.<br>
><br>
> The attached files are screehshots after startup of Scilab showing<br>
> banner lines of my Chinese messages by scilex.exe and Wscilex.exe<br>
> respectively in Windows-XP.<br>
><br>
> The first screehshot (scilexChinese.png generated by scilex.exe )<br>
> correctly displays Chinese characters , while the second one<br>
> (wscilexChinese.png by Wscilex.exe) fails.<br>
><br>
> My Windows-XP locale setting is zh_TW.BIG5 , while messages in<br>
> core.po file are in UTF-8 encoding.<br>
><br>
> It appears to me that Windows will transform messages back to its<br>
> default encoding (in my case, BIG5) and DOS console (scilex) handle<br>
> this correctly. But Java console expect an UTF-8 messages and the<br>
> received BIG5 encoding messages cause its failure in showing Chinese<br>
> banner lines.<br>
><br>
> I think this is not a specific problem associate with Chinese<br>
> language, any multibytes language with locale setting not in UTF-8<br>
> will probable fail in the same way.<br>
><br>
> I try to trace the source codes of Java console module to find a way<br>
> to attack this problem. Transform messages back to UTF-8 in<br>
> ConsolePrint.cpp ( module console) may help , for example :<br>
><br>
> int ConsolePrintf(char *line)<br>
> {<br>
> lineUtf8=localeToUtf8(line); // <------ transform back to utf8<br>
> CallScilabBridge::display(getScilabJavaVM(), line);<br>
> return 0;<br>
> }<br>
><br>
> In this way, we need a function 'localeToUtf8' which transform output<br>
> strings from locale to UTF-8 encoding. This function is provided in<br>
> Glib and may be implemented form iconv API within current Scialb<br>
> developement environment.<br>
><br>
> Hope my test can help and looking forward for suggestions or<br>
> instructions to attack this problems.<br>
><br>
> Best regards,<br>
><br>
> YungLee<br>
><br>
><br>
><br>
</div></div></blockquote></div><br>