Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Safely removing Unicode zero-width spaces and other non-printing characters

by haukex (Archbishop)
on Dec 04, 2019 at 19:11 UTC ( [id://11109669]=note: print w/replies, xml ) Need Help??


in reply to Re: Safely removing Unicode zero-width spaces and other non-printing characters
in thread Safely removing Unicode zero-width spaces and other non-printing characters

in HTML, it is possible to insert codes that produce UTF characters on the screen

That's a possibility. However, there are also escape codes to allow representing arbitrary Unicode characters, such as "\N{U+NNNN}", which are implemented natively in Perl.

I would write a perl sub that replaces all these specific characters with the HTML equivalent first

No need to write a function yourself: HTML::Entities.

  • Comment on Re^2: Safely removing Unicode zero-width spaces and other non-printing characters

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2025-07-07 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.