develooper Front page | perl.perl5.porters | Postings from June 2012

[perl #113536] GetEnvironmentStrings() mess up the values for non-ascii strings

Thread Previous | Thread Next
bulk88 via RT
June 16, 2012 21:36
[perl #113536] GetEnvironmentStrings() mess up the values for non-ascii strings
Message ID:
On Thu Jun 14 00:56:57 2012, wrote: 
> So the
>    only problem remaining is what happens in the case when characters
>    outside of the current ANSI codepage appear in the environment, and
>    that would be worth logging as a separate bug. It isn't such a
>    common case, and there are likely to be problems in other areas of
>    the code in that case anyway, e.g. you can't open a file whose name
>    contains characters outside of the ANSI codepage without jumping
>    through some hoops rather than using the built-in open() function.
>    If you agree and have no other issues with the patch then I'll
>    apply it and raise the non-ANSI characters problem as a separate
>    bug (and attach your scripts etc).

I agree. You can apply the patch. Ultimately one day all of %INC support
in perlhost.h will have have to be made to use the wide apis so all wide
char env vars roundtrip correctly between processes and through %INC.
Note, to test this patch I used the raw wide win API since %INC was
unusable. Currently perlhost.h (which implements %INC) either queries
its own cache of env, or goes out to windows API.
Plus hv.c will need some fixing to add the utf8 flag to the %INC if the
env var isnt low ascii. Anyways, I'm done. You can apply the patch, and
there should be enough notes in this ticket for someone in the future to
work on the remainder of the problems.

via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About