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

Re: unicode question

Thread Previous | Thread Next
From:
demerphq
Date:
May 3, 2012 08:48
Subject:
Re: unicode question
Message ID:
CANgJU+UH8HaBVF2pyrsD2GFPvJZKTKsyXbzMzr3SZ0XDkv4Zbg@mail.gmail.com
On 3 May 2012 17:42, Tom Christiansen <tchrist@perl.com> wrote:
>>> Playing the devil's advocate for a moment, any program that assumes an
>>> unmarked stream to be in binary not text is inherently broken on all
>>> Microsoft-encumbered platforms, as those assume the contrary condition.
>
>>And what gives you that idea?
>
> I assumed that STD{IN,OUT,ERR} were O_TEXT on Microsoft, not O_BINARY.
>
> Is this not so?

Not that I ever noticed. Maybe someone abstracted that away...

The only related thing that comes to mind is that Windows
traditionally puts a BOM in Unicode files. Which then causes problem
when you assume that *NIX style piping is safe. IOW,

cat x y z > xyz

will end up with three BOM's in it, when the author probably didnt
even know there were BOM's there in the first place.

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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