views:

830

answers:

1

I can't create index on varchar(500).

Mysql:"Specified key was too long; max key length is 1000 bytes"

+2  A: 
latin1 = 1 byte = 1 character
uft8 = 3 byte = 1 character
gbk = 2 byte = 1 character
ZA
Shouldn't utf-8 characters be of variable length (1-4), depending on the unicode code point?
Svante
The maximum number of bytes needed for one utf8 character is 3, and MySQL must make provision for all of the characters in te field to be the maximum number of bytes.
Jrgns