Ragnar Kj=F8rstad wrote: > > There isn't a reason to assume that strings use any other encoding, > > either.=20 >=20 > Isn't that what sys.{get,set}defaultencoding is for? Tthe default encoding stuff was added for experimental purposes only; in = the early days, there was some disagreement on whether the default encoding should be UTF-8, ISO-Latin-1 (8-bit subset of unicode), or ASCII (7-bit = sub- set of unicode). We finally settled on ASCII, for a couple of reasons. Robust application code should assume that the default encoding will = *always* be ASCII, and use Unicode strings and ASCII-only strings for text. > So perhaps it would be better to change the postgresql-modules to = return > unicode-objects instead of strings? That's the correct solution, yes. Checking for chars>=3D128 and returning Unicode only if the string = contains non-ASCII characters is also a valid approach. </F>
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