develooper Front page | perl.perl5.porters | Postings from May 2008

Re: on the almost impossibility to write correct XS modules

Thread Previous | Thread Next
From:
Reini Urban
Date:
May 16, 2008 05:45
Subject:
Re: on the almost impossibility to write correct XS modules
Message ID:
6910a60805160545u111e8a29n243670470e4a8f59@mail.gmail.com
2008/5/16 Jan Dubois <jand@activestate.com>:
> On Thu, 15 May 2008, Marc Lehmann wrote:
>> On Wed, May 14, 2008 at 11:55:40PM +0200, demerphq <demerphq@gmail.com> wrote:
>> From what I saw, however, filename handling on win32 is broken beyond
>> repair, as much of the win32 code overloads the utf-8 flag with the
>> additional meaning "unicode encoded, not ansi codepage" (see for example
>> almost all functions dealing with paths in Win32.xs).
>
> Why is this beyond repair? The problem of course is that Perl on Windows
> assumes that strings without the utf-8 flag are encoded with Latin-1
> encoding whereas they really are ANSI encoded. So once the automatic
> upgrading assumes ANSI encoding instead of Latin-1, everything should be
> working correctly, no?

To me the Win32 attempts also sounds fine, and I'm using it as template for
the upcoming wide char support within cygwin-1.7.

I make the same assumptions as the Win32 port, so we have to handle
the native IO with wchar_t * and the whole mb(=utf8)<->wide enchilada quirks.
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About