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

A

Allen Fowler

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,
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,260
Messages
2,571,039
Members
48,768
Latest member
first4landlord

Latest Threads

Top