Open p5pRT opened 15 years ago
This is a bug report for perl from stroornt@gmail.com\, generated with the help of perlbug 1.36 running under perl 5.10.0.
----------------------------------------------------------------- On Windows GetEnvironmentStringsA returns the strings in the OEM code page\, but CreateProcess requires it to be ANSI - as a result processes launched from perl get garbled environment. I solved this adding AnsiGetEnvironmentStrings function:
LPSTR AnsiGetEnvironmentStrings()
{
LPSTR envA;
int len;
if(IsWin95())
{
LPSTR envO, ptr;
envO=(LPSTR)GetEnvironmentStrings();
for(ptr=envO; *ptr; ptr+=strlen(ptr)+1);
len=(ptr-envO)+1;
Newx(envA, len, char);
OemToCharBuff(envO, envA, len);
FreeEnvironmentStrings(envO);
}
else
{
LPWSTR envW, ptr;
envW=GetEnvironmentStringsW();
for(ptr=envW; *ptr; ptr+=wcslen(ptr)+1);
len=(ptr-envW)+1;
int lenA=WideCharToMultiByte(CP_ACP, 0, envW, len, NULL, 0, NULL, NULL);
Newx(envA, lenA, char);
WideCharToMultiByte(CP_ACP, 0, envW, len, envA, lenA, NULL, NULL);
FreeEnvironmentStringsW(envW);
}
return envA;
}
I think this ticket is related to\, or was fixed by #12161
The RT System itself - Status changed from 'new' to 'open'
This ticket hasn't been updated for some time and the Perl version reported is 5.10.
Bulk88 when you can\, please review this ticket and update on whether ( #12161 ) resolves the reported issue.
@bulk88 can you confirm if this ticket can be closed?
Migrated from rt.perl.org#63844 (status was 'open')
Searchable as RT63844$