convert unicode characters to visibly similar ascii characters
gandalf at shopzeus.com
Tue Jul 1 20:47:17 CEST 2008
Peter Bulychev wrote:
> I want to convert unicode character into ascii one.
> The method ".encode('ASCII') " can convert only those unicode
> characters, which fit into 0..128 range.
> But there are still lots of characters beyond this range, which can be
> manually converted to some visibly similar ascii characters. For
> instance, there are several quotation marks in unicode, which can be
> converted into ascii quotation mark.
Please be more specific. There is no general solution. Unicode can
handle latin, cyrilic (russian), chinese, japanese and arabic characters
in the same string. There are thousands of possible non-ascii characters
and many of them are not similar to any ascii character.
If you only want this to work for a subset, please define that subset.
More information about the Python-list