Front page | perl.perl5.porters |
Postings from April 2012
Re: unicode question
Thread Previous
|
Thread Next
From:
Eric Brine
Date:
April 26, 2012 13:02
Subject:
Re: unicode question
Message ID:
CALJW-qFuMjikv2BAXCw1YYcYrV+-gyjOrNywUsbjVqiKRbQ5Eg@mail.gmail.com
On Thu, Apr 26, 2012 at 2:17 PM, Tom Christiansen <tchrist@perl.com> wrote:
>
> > You can't push those aside, since that's the only place
> > automatic encoding happens.
>
> > use feature 'unicode_strings';
> > my $bytes = "\xE9";
> > $bytes =~ /\w/; # Matches. Chars were expected, but you provided
> bytes,
> > # so it's as if iso-8859-1 decoding happened.
>
> Eh? I see no bytes. Did you say use bytes? Don't think so.
>
>
That's just codepoint U+00E9.
>
I most assuredly placed a byte in that scalar. I got it from /dev/random.
The match operator requires a code point, but that's not what I passed to
it. Yet, my code is buggy. Then when the asymmetry occurs.
Thread Previous
|
Thread Next