RE: [rt.cpan.org #53704] t/ole.t failing test 42 (translate ANSI->OEM)

[email protected] ("[email protected] via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Thu Jan 14 19:50:48 2010: Request 53704 was acted upon.
Transaction: Correspondence added by [email protected]
       Queue: Win32-OLE
     Subject: RE: [rt.cpan.org #53704] t/ole.t failing test 42 (translate ANSI->OEM) 
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53704 >


On Thu, 14 Jan 2010, kmx via RT wrote:
> 
> I have experienced failing test "# 42. Translate character from ANSI -> OEM" in
> t/ole.t - here is the failing message:
> 
> # Excel version is 11.0
> # ANSI(cp1252) -> OEM(cp437/cp850): 163 -> 156
> # ANSI is "ú" (163) and OEM is "Ł" (157)
> not ok 42
> 
> I am pretty sure that the reason is Eastern Europe locale on my Windows box =
> ANSI:cp1250 OEM:cp852

Yes, that diagnosis is correct.  The test assumes that the OEM codepage is
either 437 or 850 and might fail for any other code page that doesn't
map the Pound sign to chr(156).
 
> The same behaviour on Win32 strawberry perl 5.8.9 and 5.10.1.
> 
> Would it be possible to somehow modify this test to be ready for non
> English/Latin1 Windows? Even skipping the test on non-English Windows would be
> fine.

Can you confirm that the following command prints "852" on your system?

perl -MWin32::OLE::NLS -we"print GetLocaleInfo(GetSystemDefaultLCID(), Win32::OLE::NLS::LOCALE_IDEFAULTCODEPAGE)"

Cheers,
-Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.