getting rid of —

Benjamin Peterson benjamin at python.org
Wed Jul 1 19:55:23 EDT 2009


someone <petshmidt <at> googlemail.com> writes:

> 
> Hello,
> 
> how can I replace '—' sign from string? Or do split at that character?
> Getting unicode error if I try to do it:
> 
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position
> 1: ordinal not in range(128)


Please paste your code. I suspect that you are mixing unicode and normal strings.







More information about the Python-list mailing list