python Programming Glossary: str.decode
SQLite, python, unicode, and non-utf data http://stackoverflow.com/questions/2392732/sqlite-python-unicode-and-non-utf-data of getting to unicode and into another encoding looks like str.decode 'source_encoding' .encode 'desired_encoding' or if the str is.. character in the string. See error n t print uee try x str.decode 'latin_1' print str.decode 'latin_1' x validStrings x decoded.. See error n t print uee try x str.decode 'latin_1' print str.decode 'latin_1' x validStrings x decoded with latin_1 into unicode..
Double-decoding unicode in python http://stackoverflow.com/questions/4267019/double-decoding-unicode-in-python x9f should be X xc3 xbcY xc3 x9f . If I decode it using str.decode 'utf 8' becomes u'X xc3 xbcY xc3 x9f' which looks like a .....
|