Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Converting utf8 characters to named and numeric entities

by moritz (Cardinal)
on Jan 21, 2014 at 14:37 UTC ( #1071476=note: print w/ replies, xml ) Need Help??


in reply to Converting utf8 characters to named and numeric entities

Note that the only characters you need to escape in XML are <>& and in attributes also ".

The rest of the permissible Unicode codepoints can simply be written in the document's character encoding, provided you specify the encoding in the <?xml?> header like this:

<?xml version="1.0" encoding="UTF-8"?>

(Or if you leave it blank, the XML standard says it must be UTF-8, but sometimes you can find tools that don't adhere to that standard).


Comment on Re: Converting utf8 characters to named and numeric entities
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2015-07-29 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls