Sign in to follow this  
LordG

How to convert string to UTF-8 in Perl

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this