Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to concatenate utf8 safely?

by choroba (Cardinal)
on Oct 21, 2016 at 14:34 UTC ( [id://1174463]=note: print w/replies, xml ) Need Help??


in reply to How to concatenate utf8 safely?

Using is_utf8 somewhere outside of Encode is usually wrong. It doesn't tell you whether the string is UTF-8, it tells you how Perl internally keeps the value.

Make sure you have the input encoding layer set up properly, and the same for the output. Then, you can just join the strings safely without any hassle.

BTW, why do you use syswrite instead of print?

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found