Ryan Chan wrote:
> According to this document:
> http://dev.mysql.com/doc/refman/5.0/en/charset-unicode.html
>
> It said MySQL support UTF-8 using one to three bytes per character.
>
> But I have created a test table:
>
> -- create table test ( c char(5) ) default charset =utf8;
>
> >From the table status, the data length is alway a multiple of 16.
>
> So how does it support 3 byte UTF-8 in practice?
>   
I'm afraid you might need to read up on UTF8 and unicode in general.
It's not a 'choice' to have 1, 2 or 3 bytes per character. Rather, when
the characters is sufficiently weird then UTF8 will use 2 or 3 bytes for
that specific character only. Only if your entire message is weird, will
each character consume 3 bytes.

Wkr,

Werner,-

-- 
http://werner.yellowcouch.org/


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to