unicode by default

Issue #1031 resolved
jek created an issue

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)

  1. Mike Bayer repo owner

    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.

  2. Former user 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'?

  3. Mike Bayer 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.

  4. Mike Bayer 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.

  5. Log in to comment