Sylvestre,<br><br>Enclosed is my small patch for Java console to display chinese characters and the result PNG screenshot. <br><br>The test in under Windows XP, with BIG5 encoding (Windows CodePage 950).<br><br>This test confirm that it need a locale to utf-8 convert before send string to Java console for locale not compatible with  UNICODE.<br>


<br>The patch contains following files<br><br><ol><li>   localization\src\c :   localetoutf.h,  localetoutf.c<br>        provide functions<br>
    void localeToUTF(char** buffer) <--- doing locale to utf convert <br>
    openLocaleToUTFConverter(char *sysLocale,char *lang) <--- open or close converter<br>
        This two functions calls functions from iconv library which is contained in Scilab5  prerequreiment.<br><br></li><li>localization\src\c :   setlanguage.c, <br> add a line to call openLocaleToUTFConverter ,<br><br>
</li><li>localization\src\c :  getLocaleInfo_Windows.c, <br>modified return value of getLocaleUserInfo in lang_contry.codepage format t,codepage  information is used inside openLocaleToUTFConverter <br><br></li><li>console\src\cpp: consolePrint.c : <br>
add a line to call localeToUTF<br></li></ol>
<br>This is just a small patch to test locale to utf encoding concept, it need further enhancement.<br><br>I have two questions. First , in my  chinese Java console , the menu items are disabled ( unlike your Linux case)  is  this  a  bug under Windows ? Second, menu items are displayed in chinese under Linux but in english  under Windows, what make them different ?  <br>
<br><br>YungLee<br><br><div class="gmail_quote">2008/5/30 Yung-Jang Lee <<a href="mailto:yjlee123@gmail.com">yjlee123@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span></span><span style="color: rgb(121, 6, 25);">Sylvestre:<br><br></span>Let me try. Give me a week.<br><br>YungLee<br><br><div class="gmail_quote">2008/5/30 Sylvestre Ledru <<a href="mailto:sylvestre.ledru@inria.fr" target="_blank">sylvestre.ledru@inria.fr</a>>:<div>
<div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>
> To solve this problem, we must decide locale setting in runtime  and<br>
> transform  characters  back  to  UTF8  if  the locale setting  is not<br>
> in UTF8.<br>
</div>OK, then, a way of doing this could be:<br>
* if the LANG/LC_MESSAGES/whatever variable says that the language is<br>
UTF-8, don't do anything.<br>
* if not, convert it<br>
However, that sounds like a workaround to me, not a really bug fix.<br>
There must be a way to deal with this.<br>
<br>
> Hope these can help.<br>
It does!<br>
<font color="#888888"><br>
S<br>
<br>
<br>
</font></blockquote></div></div></div><br>
</blockquote></div><br>