Peter Bulychev wrote:
Then make your translation table manually and apply this method:
unicode.transla te
Finally
print s.encode('ascii ')
If you get an UnicodeEncodeEr ror then it means you had other (not
translated, non-ascii) characters in the original string.
Best,
Laszlo
Thank you for you answer.
>
If you only want this to work for a subset, please define that subset.
>
Actually, I want to convert only punctuations (dots, commas, hyphens
and so on).
>
If you only want this to work for a subset, please define that subset.
>
Actually, I want to convert only punctuations (dots, commas, hyphens
and so on).
unicode.transla te
Finally
print s.encode('ascii ')
If you get an UnicodeEncodeEr ror then it means you had other (not
translated, non-ascii) characters in the original string.
Best,
Laszlo