On Thu, Nov 08, 2007 at 01:20:22PM -0500, David Turner wrote:
> On Thu, 2007-11-08 at 21:08 +0300, Oleg Broytmann wrote:
> > > 333 for UnicodeCol (1000 bytes / 3 bytes * char)
> >
> > Why 3 bytes?!
>
> SQLObject converts Unicode to UTF-8 before sending it to MySQL. So
> length should be 1000 regardless, until we fix the mysql bindings.
UTF-8 doesn't allocate 3 bytes for a character. ASCII chars use 1 byte,
some chars use 2 bytes, some 4 bytes. "3 bytes for a character" is a rough
guess, and if we go that way we should have a way for the user to adjust
the quotient. "length", in my opinion, is good enough for this - the user
just have to understand that it is the byte length, not characters.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss