Variable Length Types and utf-8 conversion
Posted by: Luke W
Date: May 12, 2005 09:55PM

Using the guide:

http://dev.mysql.com/doc/mysql/en/charset-conversion.html

I am currently upgrading our old mysql 3.2 database over to 4.1 as we _need_ utf-8 :)

I realize it is a 2 step process, for example, if the col type is VARCHAR(50):
while still in mysql 3.2:
ALTER TABLE groups MODIFY page_title BINARY(50);

then once it's on 4.1:
ALTER TABLE groups MODIFY page_title VARCHAR(50) CHARACTER SET utf8;

First of all.....this is correct right? to ensure DB integrity?

Simple, however we also use TEXT and LONGTEXT, ie variable length types......I need to fill in the blanks:
LONGTEXT(???blank???):

while still in mysql 3.2:
ALTER TABLE groups MODIFY page_contents BINARY(????blank????);

then once it's on 4.1:
ALTER TABLE groups MODIFY page_contents LONGTEXT(????blank????) CHARACTER SET utf8;

I am sure the answer is simple, thankyou in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
Variable Length Types and utf-8 conversion
4587
May 12, 2005 09:55PM


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.