Three encoding bugs in nightly build SVN

Yung-Jang Lee yjlee123 at gmail.com
Sun Aug 10 18:22:46 CEST 2008


Hi,all :

I just working on bugs fixing for Scilab5 relating with locale and UTF
encoding convert.

The following is a  script that generate these bugs on my WindowsXP. These
bugs influence languages that are not encoding in UNICODE.

I tried  several ways to resolve these problems in the last week, and hope
can have convergent  solution  in the following  week.

WBR,

YungLee

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// test Script for Scilab5 rev. 26463
//
// just copy this script and change text variable to test
//
mode(-1);
text='中文測試'; // test string for  Windows CP950  (zh_TW) and Linux
(zh_TW.BIG5)
//
//Bug 1. terminal string output error
//
// reason : an UTF sting convert to UTF once again
//
disp(text)
mprintf(text)
//Bug 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 fail to display the
translation
about();
//
// Bug 3. string output in file, must encoding in system locale
// But in current SVN , the output string is in UTF encoding.
//
u=file('open','resultsA','unknown') //open the result file
write(u,text,'(a)') // encoding wrong, not in system locale
file('close',u)
//
u=mopen('resultsB','w') //open the result file
mfprintf(u,text) // encoding wrong, not in system locale
mclose(u);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20080811/66416dd4/attachment.htm>


More information about the dev mailing list