> You should use sys.getdefaultencoding() for this. Python's default > encoding is "ascii", BTW, not "latin-1". > OK, but supposing I log a message with the format string u"Marc-Andr\xe9". If I use "ascii" as the encoding, an exception is raised because the code for e-acute is > 128. How best should this situation be handled? I assumed that people would be using Unicode to log messages in other languages with accented characters etc. which are typically outside the ASCII range. Regards, Vinay Sajip
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