Apache OpenOffice (AOO) Bugzilla – Issue 69835
Environ function is not Unicode-compliant
Last modified: 2013-02-24 21:09:07 UTC
Environ function returns garbage if particular environment containg non ASCII string. Attached is a patch which converts result according current gsl_getSystemTextEncoding. Can you investigate this patch and apply if it is OK?
Created attachment 39355 [details] environ function diff
jsc -> ab: seems to be one for you
-> 2.1, STARTED
FIXED
Reopen
ab->rail: I realised too late that your code does not work at least for Windows, as the getenv system call is used that does not support Unicode. Anyway this is old system dependend code and should be replaced by system inde- pendend vos API calls. Maybe you want to provide a patch for this? -> INVALID
rail->ab: can you provide your test case which not pass? I use very simple one and it works for me. 1. Run "cmd" 4. set TEST="теÑÑ‚" 3. run OOo via cmd (c:\Program Files\...) 4. Add new module/macro: Sub Test MsgBox Environ("Test") End Sub Box shows proper value.
ab->rail: Reopened to have another look. This could take some time as currently I'm very busy.
set target to 2.x
STARTED
Target => 2.3
Still planned for OOo 2.3, but currently no time available for checking again
ab->rail: I had another look now and it still does not work for me. First I could not set a environment variable with set TEST="теÑÑ‚" Both with the XP command prompt application and the 4NT shell used here as developement shell the value afterwards is only displayed as "????". But this could be a problem of these shells. But also after setting the variable with settings/Control Panel/System and using your patch I still get "????" from MsgBox Environ("Test"). My system is Windows 2003 server SP1, English locale settings. Do you have a different system? What else could be wrong?
.
I have found no way to test the patch and set it back to INVALID. If a test case will become available later, the task can be reopened.
CLOSED