On Apr 27, 2006, at 2:45 PM, Tim Lesher wrote:

>
> On 4/27/06, Baruch <[EMAIL PROTECTED]> wrote:
>> I still feel that SQLObject is not doing the obvious thing here, it
>> should use the UTF-16 encoding from the start especially when it has
>> this comment for UnicodeCol: "Note: parameters in queries will not be
>> automatically encoded, so if you do a query matching a UnicodeCol
>> column you must apply the encoding yourself." This will bite the  
>> ass of
>> anyone who naively uses UnicodeCol's and thinks that his queries will
>> just work properly.
>
> This is just conjecture, but on most Python distributions, the
> internal representation for a u"foo" is UTF-8, so that's probably why
> SQLObject defaults to it.

Uh, no.  Totally wrong.  Exactly zero Python representations use  
UTF-8 internally.  They either use UCS-2 or UCS-4.

The reason for the SQLObject default is that UTF-8 is the most likely  
unicode codec for unicode data coming to and from databases (and also  
network traffic).  I know PostgreSQL deals in UTF-8, and I'd guess  
that MySQL is the same.

-bob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to