[Scilab-Dev] PATCH for set/get environment variables
Yung-Jang Lee
yjlee123 at gmail.com
Wed Jan 21 17:09:51 CET 2009
>
> This stuff is working under Linux and we should be able to reach this
> goal under Windows too.
Under Windows, if you are using language 'fr_FR' , encoding code page
is 'CP1252',
http://en.wikipedia.org/wiki/Windows-1252
A Russian character like 'Љ' can not map to system allowable
character under your 'fr_FR'
environment.
For Chinese Windows with 'CP950' (Chinese-traditional
http://www.microsoft.com/globaldev/reference/dbcs/950.mspx ) or
'CP936' ( Chinese-simpified
http://www.microsoft.com/globaldev/reference/dbcs/936.mspx)
character 'Љ' also is not allowable according to the character
mapping table.
Only Russian Windows with code page 'CP1251'
(http://en.wikipedia.org/wiki/CP1251) can accept character 'Љ' .
For the same reason, if you are going to test Chinese Windows, you can
only execute the chinese part of the test script and should bypass
other parts,
-------------------------this part only for Chinese Windows
----------------------
specialName='中文' ; // for CP950, BIG5,zh_TW, zh_TW.utf-8, zh_CN,zh_CN.utf-8
setenv('env',specialName);
if getenv('env') <> specialName then pause, end
----------------------------------------------
> Btw, could you make a small change on the function localeToUTF ?
> For now, it has a limitation about the string we can return (max size:
> MAXPRINTF/bsiz).
Right now, I use static buffers for the reason of converting speed.
And I avoid to dynamically allocate memories because that may
complicate things.
I was thinking once to create a C++ class to store the converting strings.
Yes , I myself was not satisfied about this limitation and was looking
for a better alternative. Do you have any suggestion ?
More information about the dev
mailing list