Re: Character set problem
Posted by: Rick James
Date: November 26, 2009 12:52PM

SET NAMES sets the three session system variables character_set_client, character_set_connection, and character_set_results to the given character set.
http://dev.mysql.com/doc/refman/5.0/en/set-option.html
http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html

The original complaint was about the "character set"; the collation was irrelevant.

"Character set" is the encoding; that is, what 'character' is represented by what a byte, or string of bytes.

"Collation" is a set of rules on deciding whether a character is equal to, less than, or greater than, another character. This is useful in WHERE a < b, ORDER BY, GROUP BY, etc. It is not relevant in transferring data between client and server or table to table.

"The server character set and collation are used as default values if the database character set and collation are not specified in CREATE DATABASE statements. They have no other purpose. " --
http://dev.mysql.com/doc/refman/5.0/en/charset-server.html
That is, once you have created your databases, that 'latin1' you are asking about is irrelevant.

Back to your problem... What do the bytes look like coming out of MSSql? If they are utf8 encoded, then the SET NAMES utf8 (more specifically, character_set_client) should have covered it. If they are latin1 (or, more likely, the MicroSquish variant of that), the character_set_client needs to be something else.

Options: ReplyQuote


Subject
Views
Written By
Posted
6487
November 23, 2009 10:46AM
2600
November 24, 2009 10:49PM
4945
November 25, 2009 04:34AM
Re: Character set problem
3374
November 26, 2009 12:52PM
2624
November 25, 2009 12:44PM
2442
November 26, 2009 04:30AM


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.