Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^6: UTF8 Output with XML::Feed? (updated)

by LanX (Saint)
on Mar 07, 2022 at 20:46 UTC ( [id://11141897]=note: print w/replies, xml ) Need Help??


in reply to Re^5: UTF8 Output with XML::Feed? (updated)
in thread UTF8 Output with XML::Feed?

yes I realized it in the meantime.

I didn't expect it but \N{} is automatically activating the utf8 flag for the surrounding string. (which makes sense in hindsight)

use v5.12; use warnings; use Devel::Peek; #use open OUT => qw{:encoding(UTF-8) :std}; my $t4 = "\N{LATIN SMALL LETTER A WITH RING ABOVE}\n"; Dump $t4; warn "t4: ",$t4; __DATA__
OUTPUT:
SV = PV(0xe7ae08) at 0xd308f0 REFCNT = 1 FLAGS = (POK,IsCOW,pPOK,UTF8) PV = 0x2742188 "\303\245\n"\0 [UTF8 "\x{e5}\n"] CUR = 3 LEN = 10 COW_REFCNT = 1 t4: å

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11141897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found