On Wed Jun 13 00:22:43 2012, shay wrote: > On Tue Jun 12 08:41:15 2012, kartlee05 wrote: > > > > > That was mistake on my part not to pass WC_NO_BEST_FIT_CHARS in acutal > > > conversion call from UTF-16 to ACP. I will revise the patch and sent > > it > > > now. > > > > > > BTW, I don't think the win32 code would really work if UTF-8 is > > > internally used for conversion. I see we use lot of calls toUpper, > > > tolower which would not really work with utf-8 directly. So it is good > > > if ACP is used. > > > > > > -Karthik > > > > I now fixed the patch to use WC_NO_BEST_FIT_CHARS in the actual > > conversion call. Please give a shot. > > > > I think there is a bug in this and the previous patch (but not your > original one): the calculation of 'wenvstrings_len' wrongly sets 'size' > to 1 at the start of the for-loop, but never uses 'size' again. It > should have set 'wenvstrings_len' to 1 instead, otherwise that ends up > with the wrong value and causes many, many tests to fail when running > the full regression test suite. > > After changing > > for(size = 1; *lpWTmp != '\0'; lpWTmp += env_len + 1) { > > to > > for(wenvstrings_len = 1; *lpWTmp != '\0'; lpWTmp += env_len + 1) { > > the patch looks good to me code-wise, but I will await any further input > from bulk88 before committing. I fixed the bug in my patch which failed to account for last '\0' char in the environment strings. > > Could you also fix up a couple of the comments, though, please? The > comment about converting from UTF-16 to UTF-8 should say *to the ANSI > codepage* instead. You also use C++ style comments in two places, but > perl always uses C style comments since most files are C and not all C > compilers accept C++ style comments. This is also fixed now. The revised patch is attached now. Please take a look. -Karthik --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=113536Thread Previous | Thread Next