Difference between Encoding and collation?

I have seen certain questions and bugs related to encoding and collation. Could anyone of the visitors explain the difference in MySQL domain?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Encoding refers to that character set used.
Collation determines the sort order.

See: http://dev.mysql.com/doc/refman/5.5/en/charset-general.html

Method 2

Excellent answers found here, at programmers.SE:

collation defines the behaviour of comparison operators: =, >, <, <=, >= …

Method 3

I think following qualifies as a better definition for Encoding

Encoding is an algorithm that translates a list of numbers to binary so it can be stored on disk. For example UTF-8 would translate the number sequence 1, 2, 3, 4 like this: “00000001 00000010 00000011 00000100″.

Source: http://www.calipus.com/blog/what-is-the-difference-between-character-sets-encoding-collations/


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x