468,284 Members | 1,580 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,284 developers. It's quick & easy.

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

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
3 4889
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
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
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.

By using this site, you agree to our Privacy Policy and Terms of Use.