[Scilab-Dev] Re: output encoding patch + Chinese translation patch

Yung-Jang Lee yjlee123 at gmail.com
Mon Aug 18 16:40:39 CEST 2008


Sylvestre,

Yes, indeed, I have miss two files modules\localization\charEncoding.c, and
charEncoding.h (I am newer for svn) in the patch. I will arrange to see if I
can send you the missing files to you before I back to home.

Sorry for the mistake.

YungLee

2008/8/17 Sylvestre Ledru <sylvestre.ledru at scilab.org>

> Hello YungLee,
>
> Seems a nice and useful work! I am trying to test it.
> However, it seems that a file is missing in your diff.
> For example, I don't have the function "openCharEncodingConverter"
> (maybe you forgot the "svn add" on this file).
>
> Thanks again,
> Sylvestre
>
> Le samedi 16 août 2008 à 02:03 +0800, Yung-Jang Lee a écrit :
>  > Sylvestre :
> >
> >    I have  finished  the console display and input/outfile encoding
> > fix. Also included is my zh_TW translation.
> >
> >    In this version, Scilab5 is  internal UTF encoding both in Java and
> > C/C++ contex. This way Java and TCL interface need only handle UTF
> > string.
> >
> >    System locale is used in 1. Dos/Shell terminal input/output 2.
> > External file read/write.
> >
> >    In current implementation,  C-style  output function  fail to
> > handle  UTF characters is also fixed in this patch.
> >
> >  I   have test my patch with the attached script. My patch still fail
> > to past the  Fortran-Style output test, because this need old-fashion
> > fortran  programming skill and I am not qualified about it. But the
> > C-style output encoding is fixed.
> >
> >    Input  encoding for command such as 'exec"scriptFile"'  is changed
> > to system locale, to consistent with output encoding.
> >
> >   I have a business trip from next monday for a week. Just leave
> > comments or  suggestions to my email, I will response to this topic
> > when I back to my desk.
> >
> >
> > WBR,
> >
> > YungLee
> >
> >
> >
> >
> > ------------------------Test
> > Script-------------------------------------
> > mode(-1);
> > text='中文測試'; // test string for  Windows CP950  (zh_TW) and Linux
> > (zh_TW.BIG5)
> > //
> > //test 1. terminal string output error, display ok for Chinese, fail
> > for Russian
> > //
> > // reason : an UTF sting convert to UTF once again
> > //
> > disp(text) //
> > mprintf(text)
> > //test 2. about() command fail to display Chinese/Russian
> > //
> > // reason :gettext fununction should return string in UTF rather than
> > // system locale, this influence about() command
> > //
> > x_message(gettext('&File')) // gettext inside x_message
> > about();
> > //
> > // Bug 3. string output in file, must encoded in system locale
> > // in current SVN in the output string is in UTF encoding.
> > //
> > //  Fortran-Style
> >
> output<----------------------------------------------------------------------
> not easy to fix,
> > u=file('open','resultsA','unknown') //open the result file
> > write(u,text,'(a)') // encoding wrong, not in system locale
> > file('close',u)
> > // C style output
> > u=mopen('resultsB','w') //open the result file
> > mfprintf(u,text+" plus %s\n",text) // file encoding wrong, not in
> > system locale
> > mclose(u);
> > //
> > // Bug5. formatted output to a string
> > //
> > printf(text+" with aonther %s\n",text) // output encoding wrong, not
> > in system locale
> > //
> > msprintf(text+" plus %s\n",text) // error in terminal mode,ok for java
> > console
> > //
> > // Text Drawing test : test to see any side effect for text drawing
> > //
> > title('title test'+text);
> > t=0:0.1:2*%pi;
> > plot2d(t,[sin(t'),cos(t')],[-1,2]);
> > legends(['legends test'+text ;'text B '+text],[-1,2], opt=3 )
> > ---------------------------------------------------------
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20080818/c5deb423/attachment.htm>


More information about the dev mailing list