unicode-to-ascii: replace with space, not "?"

Allen Fowler allen.fowler at yahoo.com
Wed Oct 14 22:08:53 EDT 2009


Hello,

I've been using "data.encode('ascii','replace')" to force an ASCII string out of Unicode data, with "?" in the place of non-ASCII letters.

However, now I want to use a blank space (or maybe a dash) instead of a question mark.

How do I do this?

Thank you,
:)



      



More information about the Python-list mailing list