Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Converting entities in JSON context

by choroba (Cardinal)
on May 19, 2022 at 13:00 UTC ( [id://11144005]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Converting entities in JSON context
in thread Converting entities in JSON context

Here, you're using non-ASCII characters in the source code (the second argument to is).

To tell Perl how to interpret them, you need to

use utf8;

This makes Perl interpret the part of the source in the lexical scope of the pragma as UTF-8 encoded. ( Update: And you need to save the source as UTF-8, too, of course.)

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: Converting entities in JSON context
by Anonymous Monk on May 19, 2022 at 13:11 UTC

    D'oh! Yes, of course! Makes sense now. Thank you!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-16 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found