On Jan 7, 2008 2:20 PM, Michael Bayer <[EMAIL PROTECTED]> wrote:
> 0.4.2b
> ------
> - sql
>      - changed name of TEXT to Text since its a "generic" type; TEXT
> name is
>        deprecated until 0.5.  The "upgrading" behavior of String to Text
>        when no length is present is also deprecated until 0.5; will
> issue a
>        warning when used for CREATE TABLE statements (String with no
> length
>        for SQL expression purposes is still fine) [ticket:912]

What are we supposed to do with Unicode? As far as I can tell, the
Unicode type passes its defined length directly to the underlying
string, so that a Unicode(30) column is turned into a VARCHAR(30) or
the dialect equivalent. I may be able to determine that a particular
column should hold up to 30 Unicode characters, for example, but if
the default encoding of UTF-8 is used, each character will use
anywhere from one to four byes, so that in the extreme case, it will
be trying to stuff a 120-byte string into a VARCHAR(30)! The only way
to be certain of the length is to use UTF-32, although in practice I
doubt I will ever get astral plane characters in this app, so UTF-16
would probably be sufficient. But I _like_ UTF-8 and would prefer to
use it. Perhaps the Unicode type should multiply its length by 4?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to