Re: DATABASE UTF 8, memory fields.
Posted by: Rick James
Date: October 24, 2015 08:18PM

With utf8,
CHAR(10) takes 30 bytes always.
VARCHAR(10) takes 1 to 31 bytes.

An individual column can be declared CHARACTER SET utf8, overriding whatever default is set for the table.

You cannot change the character set for an individual row.

If you put 12 English characters in a VARCHAR(50), it will take 13 bytes, whether it is ascii, latin1, or utf8.
If you put 12 Asian characters in a VARCHAR(50), utf8, it will take 37 bytes. (Most Asian characters take 3 bytes in utf8.)

Options: ReplyQuote


Subject
Written By
Posted
October 23, 2015 02:00AM
Re: DATABASE UTF 8, memory fields.
October 24, 2015 08:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.