Changes between Version 4 and Version 5 of StringEncoding
- Timestamp:
- Apr 6, 2007, 5:25:27 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
StringEncoding
v4 v5 103 103 104 104 * Django does not currently handle arbitrary database encodings, unattached to the concept of DEFAULT_CHARSET. 105 +Add DEFAULT_CHARSET setting106 +teach database backends how to encode unicode and bytestrings for the database (avoid pointless round-trips for bytestrings, if the target is UTF-8).105 * Add DEFAULT_CHARSET setting 106 * teach database backends how to encode unicode and bytestrings for the database (avoid pointless round-trips for bytestrings, if the target is UTF-8). 107 107 * The getttext() functions return bytestrings using DEFAULT_CHARSET. This causes a number of difficulties in the code, because UTF-8 encoded bytestrings cannot safely be passed to the string.join() method. 108 +Consider switching to ugettext() and friends everywhere internally. These return unicode strings that can be used in join() calls. The alternative requires being aware of when bytestrings might be involved and doing yet another decode()/encode() round-trip around the join(). Error-prone and time-consuming.108 * Consider switching to ugettext() and friends everywhere internally. These return unicode strings that can be used in join() calls. The alternative requires being aware of when bytestrings might be involved and doing yet another decode()/encode() round-trip around the join(). Error-prone and time-consuming.