Jump to content
  • Advertisement
Sign in to follow this  
LordG

How to convert string to UTF-8 in Perl

This topic is 4773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to know how to convert a string to UTF-8 and then URL escape the result. The following is an example python script for XML encoding a URL: $ python Python 2.2.2 (#1, Feb 24 2003, 19:13:11) >>> import xml.sax.saxutils >>> xml.sax.saxutils.escape("http://www.test.org/view?widget=3&count>2") The encoded URL from the example above is: http://www.test.org/view?widget=3&count>2 I need to know how to do this perl. Does anyone know how?

Share this post


Link to post
Share on other sites
Advertisement
Um, I don't see a difference there (maybe you forgot the extra level of escaping needed to deal with the fact that the boards grok html :) ), but I would search CPAN for an appropriate module to do the job.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!