Difference between Encoding and collation?

ぐ巨炮叔叔 提交于 2019-12-28 12:04:36

问题


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


回答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




回答2:


Excellent answers found here, at programmers.SE:

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




回答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/



来源:https://stackoverflow.com/questions/7723648/difference-between-encoding-and-collation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!