[Scilab-Dev] PATCH for set/get environment variables

Yung-Jang Lee yjlee123 at gmail.com
Sat Jan 3 16:40:03 CET 2009


Sylvestre,

Attach is the modified patch for getenv/setenv, please take a look to
see if the problems you mentioned been solved or not.


 In this patch, if the system encoding is not explicitly given  (for
examples, fr_FR, C)  the encoding is set to  ISO8859-1 rather than
UTF-8, with following exceptions


  zh_TW ----> BIG5        //chinese traditional
  zh_CN -----> GB2312 ) //chinese simplified
  ru_RU  -----> ISO-8859-5 //russian
  ja_JP, jp_JP ---->eucJP // japaness
  ko,ko_KR ----->eucKR // korean


And I have tested it under Linux with follwing	script,

-----------------------------------------------------------------------------------------------
specialName='中文' ;     //  for CP950, BIG5,zh_TW, zh_TW.utf-8, zh_CN,zh_CN.utf-8
  or
specialName='ЁЂЄЉф';  // russian LANG=ru_RU, ru_RU.utf-8
  or
specialName='グゲゾタ'; // Japaness LANG=ja_JP ,
   or
specialName='메일링을';  //  korean LANG=ko_KR, ko_KR=utf-8
   or
specialName='æøå';    // LANG=fr_FR,C,en_US, and fr_FR.utf


setenv('env',specialName)
getenv('env')==specialName
-----------------------------------------------------------------------------------------

And it pass for all different LANG setting.


Yung-Jang Lee
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setgetenv2.diff
Type: text/x-patch
Size: 8589 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090103/d0f450c1/attachment.bin>


More information about the dev mailing list