您的位置:首页 > Web前端

Difference betweeh Character sets and Collate

2012-11-30 13:54 218 查看
Character sets is a list of symbols. If you compare ASCII to latin1, with latin1 you will be able to write all american words because latin1 contains all ASCII characters, which are sufficient to write any american word. On the contrary, with ASCII you will not be able to write all words of Western European specific languages, because for instance characters like 'À', 'ë', 'õ', 'Ñ' are missing.

Collation is about comparison between characters. It defines a set of rules to compare characters of a character set.

In MySQL, collations are often related to one language (e.g. 'latin1_swedish_ci', 'latin1_german1_ci', etc.). When you order a select query, a word starting by 'ö' will be placed between two words starting by 'o' and 'p' in some languages (with some collations). But with another collation, this character may be placed completely at the end, which make the resulting selection different.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: