Sylvestre,<br><br>Yesterday I send my mail to dev. list with two attached files.<br><br>I am not familiar with svn, so I send the files again to you (chinesePatch.rar and ScilabWinJava.png) . <br><br>If still trouble in receiving files let me know.<br>
<br>YungLee<br><br><div class="gmail_quote">2008/6/3 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;">
Hi,<br>
Thanks but I haven't received your previous email :|<br>
<br>
If you checkout the source from the svn, could you do:<br>
# svn add your-new-files<br>
# svn diff > for-sylvester.diff<br>
=> mail it to me.<br>
<br>
Thanks<br>
Sylvestre<br>
<br>
Le mardi 03 juin 2008 à 20:33 +0800, Yung-Jang Lee a écrit :<br>
<div><div></div><div class="Wj3C7c">> Sorry,<br>
><br>
> The files I send have two bugs due to copy and paste mistake,<br>
><br>
> ----------localetoutf.c-----------------------------------<br>
> BOOL openLocaleToUTFConverter(char *sysLocale,char *lang)<br>
> {<br>
> // Assume sysLocale in lang_contry.charset or lang_contry<br>
> format<br>
> //<br>
> // Ex. en_US, zh_TW.CP950, zh_CN.UTF-8<br>
> //<br>
> char encoding[5];<br>
> char * pch=strchr ( sysLocale,<br>
> '.');//<------------------------------- this line missing<br>
> if(pch){<br>
> -----------------------------------------------------------------<br>
><br>
> and<br>
> --------------------getLocaleInfo_Windows.c-----------------------------<br>
> // BY YJLee get Windows CODE Page Information\ <----<br>
> should delete last character<br>
> int ret = GetLocaleInfo(LOCALE_USER_DEFAULT,<br>
> LOCALE_IDEFAULTANSICODEPAGE,<br>
> -----------------------------------------------------------------------<br>
><br>
> Please check it.<br>
><br>
> YungLee<br>
><br>
> 2008/6/2 Yung-Jang Lee <<a href="mailto:yjlee123@gmail.com">yjlee123@gmail.com</a>>:<br>
> Sylvestre,<br>
><br>
> Enclosed is my small patch for Java console to display chinese<br>
> characters and the result PNG screenshot.<br>
><br>
> The test in under Windows XP, with BIG5 encoding (Windows<br>
> CodePage 950).<br>
><br>
> This test confirm that it need a locale to utf-8 convert<br>
> before send string to Java console for locale not compatible<br>
> with UNICODE.<br>
><br>
> The patch contains following files<br>
><br>
</div></div>> 1. localization\src\c : localetoutf.h,<br>
<div class="Ih2E3d">> localetoutf.c<br>
> provide functions<br>
> void localeToUTF(char** buffer) <--- doing locale<br>
> to utf convert<br>
> openLocaleToUTFConverter(char *sysLocale,char<br>
> *lang) <--- open or close converter<br>
> This two functions calls functions from iconv<br>
> library which is contained in Scilab5 prerequreiment.<br>
><br>
</div>> 2. localization\src\c : setlanguage.c,<br>
<div class="Ih2E3d">> add a line to call openLocaleToUTFConverter ,<br>
><br>
</div>> 3. localization\src\c : getLocaleInfo_Windows.c,<br>
<div class="Ih2E3d">> modified return value of getLocaleUserInfo in<br>
> lang_contry.codepage format t,codepage information is<br>
> used inside openLocaleToUTFConverter<br>
><br>
</div>> 4. console\src\cpp: consolePrint.c :<br>
<div><div></div><div class="Wj3C7c">> add a line to call localeToUTF<br>
><br>
> This is just a small patch to test locale to utf encoding<br>
> concept, it need further enhancement.<br>
><br>
> I have two questions. First , in my chinese Java console ,<br>
> the menu items are disabled ( unlike your Linux case) is<br>
> this a bug under Windows ? Second, menu items are displayed<br>
> in chinese under Linux but in english under Windows, what<br>
> make them different ?<br>
><br>
><br>
> YungLee<br>
><br>
> 2008/5/30 Yung-Jang Lee <<a href="mailto:yjlee123@gmail.com">yjlee123@gmail.com</a>>:<br>
><br>
><br>
> Sylvestre:<br>
><br>
> Let me try. Give me a week.<br>
><br>
> YungLee<br>
><br>
> 2008/5/30 Sylvestre Ledru <<a href="mailto:sylvestre.ledru@inria.fr">sylvestre.ledru@inria.fr</a>>:<br>
><br>
><br>
><br>
> > To solve this problem, we must decide locale<br>
> setting in runtime and<br>
> > transform characters back to UTF8 if<br>
> the locale setting is not<br>
> > in UTF8.<br>
><br>
> OK, then, a way of doing this could be:<br>
> * if the LANG/LC_MESSAGES/whatever variable<br>
> 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,<br>
> 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>
><br>
> S<br>
><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>