Rune Hansen wrote: > >>> unicode("Gratis øl","iso-8859-1") > u'Gratis \xf8l' > >>>ord("\xf8") > 248 > > What I need is the converted string to read u'Gratis \248l' (* > How do I do this without going through each and every character of the > string? > (not that I have figgured out how to do that right either) I see your problem is already solved, just want to add that normally (read: C and Python) the backslash notation is base 8 not base 10. >>> ord("\248") Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: ord() expected a character, but string of length 2 found >>> oct(248) '0370' >>> ord("\370") 248 >>> Peter
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4