Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

UTF8 Curly Quotes To ASCII

DZone's Guide to

UTF8 Curly Quotes To ASCII

·
Free Resource
Here's a cheap hack to convert UTF8 curly quotes to ASCII (but try to use CPAN module instead of this if you can).


 $xml =~ s/\xe2\x80\x99/\'/gs;
 $xml =~ s/\xe2\x80\x98/\'/gs;
 $xml =~ s/\xe2\x80\x9c/\"/gs;
 $xml =~ s/\xe2\x80\x9d/\"/gs;
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}