unicode by default
100% unicode by default. Binary types return str/bytes; varchar columns can have a conversion charset to force a kick down to str/bytes on input and output?
Comments (7)
-
repo owner -
reporter think py3k. 'Unicode' column type goes away. 'String' column type is unicode by default.
-
repo owner - changed milestone to py3k
-
Account Deleted Replying to zzzeek:
are we talking, force everyone to use u'' for all String types ? that might not be a popular decision.
why not 'from future import unicode_literals'?
-
repo owner I think this is going to happen naturally in the py3k branch. it will be a product of DBAPIs all passing unicode back to us.
-
repo owner so my take on this is that
String
/Unicode
in SQLA are still entirely meaningful. databases have a wide variety of unicode-aware behaviors and these types are more about what happens on the DB side. As far as accepting unicode and returning unicode by default, clearly we have that covered these days. String also has a ton of flags on it, though it doesn't return a str for a unicode. That's a less common use case for which we have an example in the 06Migration how to build your own typedecorator that does that. If we want to add that in core it can be a typedecorator and would be a separate ticket from this. -
repo owner - removed milestone
Removing milestone: py3k (automated comment)
- Log in to comment
are we talking, force everyone to use u'' for all String types ? that might not be a popular decision.
if you can flesh out more specifically what you're proposing (names of datatypes, usage) that would make it clearer.