Encoding einen string zu ascii

Habe ich eine lange Zeichenfolge, die ich verschlüsseln will, auf ascii. Ich bin dabei:

s = s.encode('ascii', 'replace')

aber ich bekommen:

'ascii' codec can't decode byte 0xc3 in position 2646: ordinal not in range(128)

(Ich habe auch versucht 'ignore' aber es hilft nicht.)

Was mache ich falsch?

InformationsquelleAutor Guy | 2009-11-19
Schreibe einen Kommentar