MySQL Forums
Forum List  »  PHP

Re: How to display character set and collation method using PHP
Posted by: Rick James
Date: May 23, 2012 08:48AM

In 4.0 and before, characters were simply bytes. MySQL had no concept of CHARACTER SET.

It did not even know the term "SESSION":
"The GLOBAL and SESSION modifiers are new in MySQL 4.0.3."
-- http://dev.mysql.com/doc/refman/4.1/en/show-variables.html

You can do SHOW VARIABLES to see what was available. In 5.5, there are a lot more VARIABLES.

If you know what encoding the old bytes are in, _and_ if they are in a consistent encoding (that is, no mixing of utf8 and latin1 in the same column), then it is possible to 'do the right thing' after migrating the data.

http://mysql.rjweb.org/doc.php/charcoll
will give you some clues and understanding of what the issues are. Unfortunately, there is no "do this" statement specific for your case.

Options: ReplyQuote




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.