<div dir="ltr">Hi,all:<br><br>I have check that the results to call localeToUTF and ANSIToUTF8 are exact the same in my machine. But for CP1252 encoding I don't convert to UTF inside localeToUTF in current implementation (I thought CP1252 is a subset of UNICODE).<br>
<br>So, may be we can remove calling 'ANSIToUTF8' in 'printf_scilab' and let 'localeToUTF' always perform convert even for CP1252 encoding.<br><br>Or any suggections ?<br><br>YungLee<br><br><br><br>
<div class="gmail_quote">2008/8/2 Yung-Jang Lee <span dir="ltr"><<a href="mailto:yjlee123@gmail.com">yjlee123@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi, all :<br><br>In recent  SVN trunk, I found a new files windows_tools*\charEncodings.c that have functions for encoding convert and this is conflicted  with function in file locazilation*\localetoutf.c .  Function ANSIToUTF8 (defined in charEncodings.c ) is used  in printf_scilab :<br>

<br><br>-----------------------sciprint.c---------------------------------------<br>void printf_scilab(char *buffer,BOOL withDiary)<br>{<br>    if (buffer)<br>    {<br>        if (getScilabMode() == SCILAB_STD)<br>        {<br>

            #ifdef _MSC_VER<br>            {<br>                char *UTF8Buffer = ANSIToUTF8(buffer);//<-------- <br>                if (UTF8Buffer)<br>                {<br>                    ConsolePrintf(UTF8Buffer);    //<------------------------- call localeToUTF inside ConsolePrintf<br>

                    FREE(UTF8Buffer);<br>                }<br>-------------------------------------------------------------------------------<br><br>On my machine (WINDOW/XP,CP950) , conversion to UTF strings is thus performed twice, and this make console fail to display chinese again.<br>

<br>I think functions in files 'charEncodings.c' and 'localetoutf.c'  should merged and the encoding transformation need some agreements between developers.<br><br>YungLee<br><br><br></div>
</blockquote></div><br></div>