<div dir="ltr">Hi,all :<br><br>I just working on bugs fixing for Scilab5 relating with locale and UTF encoding convert.<br><br>The following is a  script that generate these bugs on my WindowsXP. These bugs influence languages that are not encoding in UNICODE.  <br>
<br>I tried  several ways to resolve these problems in the last week, and hope can have convergent  solution  in the following  week. <br><br>WBR,<br><br>YungLee<br><br>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br>
// test Script for Scilab5 rev. 26463 <br>//<br>// just copy this script and change text variable to test<br>//<br>mode(-1);<br>text='中文測試'; // test string for  Windows CP950  (zh_TW) and Linux (zh_TW.BIG5)<br>//<br>
//Bug 1. terminal string output error<br>//<br>// reason : an UTF sting convert to UTF once again<br>//<br>disp(text) <br>mprintf(text) <br>//Bug 2. about() command fail to display Chinese/Russian<br>//<br>// reason :gettext fununction should return string in UTF rather than <br>
// system locale, this influence about() command<br>//<br>x_message(gettext('&File')) // gettext inside x_message fail to display the translation<br>about();<br>//<br>// Bug 3. string output in file, must encoding in system locale<br>
// But in current SVN , the output string is in UTF encoding.<br>//<br>u=file('open','resultsA','unknown') //open the result file<br>write(u,text,'(a)') // encoding wrong, not in system locale <br>
file('close',u) <br>// <br>u=mopen('resultsB','w') //open the result file<br>mfprintf(u,text) // encoding wrong, not in system locale <br>mclose(u);  <br></div>