By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

How to convert Unicode string to raw string escaped with HTML Entities

P: n/a
Hi,

I'm looking for a way to convert en unicode string encoded in UTF-8 to
a raw string escaped with HTML Entities. I can't seem to find an easy
way to do it.

Quote from urllib will only work on ascii (which kind of defeat the
purpose imho) and escape from cgi doesn't seems to do anything with my
string.

Any suggestion ?

May 10 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ldng wrote:
Hi,

I'm looking for a way to convert en unicode string encoded in UTF-8 to
a raw string escaped with HTML Entities. I can't seem to find an easy
way to do it.

Quote from urllib will only work on ascii (which kind of defeat the
purpose imho) and escape from cgi doesn't seems to do anything with my
string.
Probably worth having a look at this:

http://effbot.org/zone/unicode-convert.htm

TJG
May 10 '07 #2

P: n/a
On 10 mai, 11:03, Tim Golden <m...@timgolden.me.ukwrote:
>
Probably worth having a look at this:

http://effbot.org/zone/unicode-convert.htm
Great ! You made my day :-)

Thanks.
May 10 '07 #3

P: n/a
ldng wrote:
On 10 mai, 11:03, Tim Golden <m...@timgolden.me.ukwrote:
>Probably worth having a look at this:

http://effbot.org/zone/unicode-convert.htm

Great ! You made my day :-)

Thanks.
That's all right, but it's the effbot you
need to thank. (Hope Fredrik's reading this).

TJG
May 10 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.