Issue 69835 - Environ function is not Unicode-compliant
Summary: Environ function is not Unicode-compliant
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: ab
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-25 13:02 UTC by rail_ooo
Modified: 2013-02-24 21:09 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
environ function diff (790 bytes, patch)
2006-09-25 13:02 UTC, rail_ooo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description rail_ooo 2006-09-25 13:02:03 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?
Comment 1 rail_ooo 2006-09-25 13:02:37 UTC
Created attachment 39355 [details]
environ function diff
Comment 2 jsc 2006-09-25 13:24:40 UTC
jsc -> ab: seems to be one for you
Comment 3 ab 2006-09-25 13:29:59 UTC
-> 2.1, STARTED
Comment 4 ab 2006-09-28 15:30:46 UTC
FIXED
Comment 5 ab 2006-10-19 09:46:19 UTC
Reopen
Comment 6 ab 2006-10-19 09:47:34 UTC
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
Comment 7 rail_ooo 2006-10-19 14:50:14 UTC
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.
Comment 8 ab 2006-11-28 07:25:31 UTC
ab->rail: Reopened to have another look. This could 
take some time as currently I'm very busy.
Comment 9 Martin Hollmichel 2006-11-28 10:12:29 UTC
set target to 2.x
Comment 10 ab 2007-01-02 11:14:57 UTC
STARTED
Comment 11 kai.sommerfeld 2007-02-07 10:29:05 UTC
Target => 2.3
Comment 12 ab 2007-05-14 11:51:26 UTC
Still planned for OOo 2.3, but currently no time available for checking again
Comment 13 ab 2007-06-21 15:01:09 UTC
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?
Comment 14 ab 2007-06-21 15:18:40 UTC
.
Comment 15 ab 2007-07-16 10:15:14 UTC
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.
Comment 16 ab 2007-07-24 10:38:28 UTC
CLOSED