List:General Discussion« Previous MessageNext Message »
From:Ben Clewett Date:July 3 2007 8:09am
Subject:Re: Field size for UTF-8 characters
View as plain text  
 From my experience with InnoDB,

IF the field is an index, it will use 3 bytes per character.  So 
VARCHAR(50) = 150 bytes, when fully populated.  (+ 1 for the length = 
151 bytes.)

IF the field is not an index, each character will consume between 1 and 
3 chars.  So VARCHAR(50) = 51 -> 151 chars, when fully populated.

Ben

Cathy Murphy wrote:
> I am limiting text to 50 chars in mysql field by varchar(50) ( UTF-8
> enabled)
> but what if the user enters 50 japanese chars, does mysql accomodate it OR
> we have to consider some buffer during design ?
> 

Thread
Field size for UTF-8 charactersCathy Murphy3 Jul
  • Re: Field size for UTF-8 charactersBen Clewett3 Jul
  • Re: Field size for UTF-8 charactersKenji HIROHAMA3 Jul