Latin -> UTF-8 - All or Some?
Posted by: dbv
Date: November 29, 2006 02:02PM

I'm planning on moving from an all Latin charset to UTF-8 on MySQL 4.1.

I have heard some conflicting recommendations on what to do so I was wondering which one is correct:

1. All tables/columns should be UTF-8 + Apache/PHP etc

2. The smallest column size should be used.

For example, if I have a table with 3 columns, "user-id", "username", and "full-name", if I follow #1, all columns should be converted to UTF-8, however if I follow #2, only "full-name" should be converted to UTF-8 since "username" will only contain ascii characters, and "user-id" will only contain integers. So a lot of space is saved by not converting everything to UTF-8.

For example, the username, "joeuser" takes up 7 bytes in Latin charset, but 21 bytes in UTF-8. So which is better to do, #1 or # 2, thanks for any advice on this.

Options: ReplyQuote


Subject
Views
Written By
Posted
Latin -> UTF-8 - All or Some?
3835
dbv
November 29, 2006 02:02PM
1940
December 01, 2006 04:26AM
1969
dbv
December 01, 2006 11:01AM


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.