<div dir="ltr">François  and all :<br><br>Yes, the message you response is more than a week old. It seems have problems to delivery to ML during weekend. <br><br>Coding converting is quite complicate things for software like Scilab5. C/C++/Java/TCL and Scilab language itself  all have their own  strategy to handle encoding,  it need a standardization for code converting between different context.<br>
<br><br>YungLee<br><br><div class="gmail_quote">2008/8/10 François Vogel <span dir="ltr"><<a href="mailto:fvogelnew1@free.fr">fvogelnew1@free.fr</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;">
Hi,<br>
<br>
I have also noticed there seem to be some duplicates here and there.<br>
<br>
And more than what you're reporting: in ScilabEval.c for instance, conversion from UTF-8 to ANSI is performed by a function from the Tcl librayr (Tcl_UtfToExternal).<br>
<br>
Cleaning and standardization is needed, but maybe I'm coming after things were done (your message is more than a week old)?<br>
<br>
Francois<br>
<br>
<br>
Yung-Jang Lee said on 02/08/2008 18:31:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
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>
2008/8/2 Yung-Jang Lee <<a href="mailto:yjlee123@gmail.com" target="_blank">yjlee123@gmail.com</a> <mailto:<a href="mailto:yjlee123@gmail.com" target="_blank">yjlee123@gmail.com</a>>><div class="Ih2E3d"><br>
<br>
    Hi, all :<br>
<br>
    In recent  SVN trunk, I found a new files<br>
    windows_tools*\charEncodings.c that have functions for encoding<br>
    convert and this is conflicted  with function in file<br>
    locazilation*\localetoutf.c .  Function ANSIToUTF8 (defined in<br>
    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<br>
    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<br>
    between developers.<br>
<br>
    YungLee<br>
<br>
<br>
<br>
</div></blockquote>
</blockquote></div><br></div>