develooper Front page | perl.perl5.porters | Postings from January 2020

=?utf-8?B?UmU6IOKAnHN0cmljdOKAnSBzdHJpbmdzPw==?=

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
January 7, 2020 03:04
Subject:
=?utf-8?B?UmU6IOKAnHN0cmljdOKAnSBzdHJpbmdzPw==?=
Message ID:
D4F5E15A-BE36-42CB-A6D3-66A92D0CEF37@felipegasper.com


> On Jan 6, 2020, at 5:53 PM, Leon Timmermans <fawaka@gmail.com> wrote:
> 
> A decoded string may or may not have the SVfUTF8 flag set. This is not
> something you should assume.

I could swear I checked this earlier, but apparently not:

> perl -MDevel::Peek -e'my $str = "abc"; utf8::decode($str); Dump($str)'
SV = PV(0x7fb290804c70) at 0x7fb2908162a0
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x7fb290404980 "abc"\0
  CUR = 3
  LEN = 10

So, there’s what I’d been missing.

Now to chow down on some humble pie …

-Felipe
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