I have seen certain questions and bugs related to encoding
and collation
. Could anyone of the visitors explain the difference in MySQL
domain?
Asked
Active
Viewed 7,557 times
31

Ghazanfar Mir
- 3,493
- 2
- 26
- 42
-
3http://dev.mysql.com/doc/refman/5.5/en/charset-general.html – deceze Oct 11 '11 at 09:08
-
Possible duplicate of [What does character set and collation mean exactly?](http://stackoverflow.com/questions/341273/what-does-character-set-and-collation-mean-exactly) – Peyman Mohamadpour Jun 08 '16 at 22:05
3 Answers
22
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

Johan
- 74,508
- 24
- 191
- 319
4
Excellent answers found here, at programmers.SE:
collation defines the behaviour of comparison operators: =, >, <, <=, >= ...
0
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/

AbcAeffchen
- 14,400
- 15
- 47
- 66

danieljustin
- 9
- 1
-
2You only answered half of the question, where is the collation part? – AguThadeus Oct 07 '21 at 05:50