2

Possible Duplicate:
Convert XML/HTML Entities into Unicode String in Python
Decode HTML entities in Python string?

I am using Python 2.7 and am fairly lost in unicode type. I looked up variety of help files and tutorials on it by I cannot get it actually working in the context I need. http://docs.python.org/howto/unicode.html

I have a library with names and it was saved decoded, ex. aaron's I need to encode the name into a user friendly manner Seems like basic answer to encoding

a ='aaron's,' unicode(a) a.encode('ascii', 'replace') 

returns:

'aaron's,' 

Which is not what I am looking for.

1

1 Answer 1

4

You are looking for HTML entity decoding, not Unicode (or codec) decoding.

See Decode HTML entities in Python string? for ways to do this.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.