From: Date: May 7 2008 2:13pm Subject: svn commit - mysqldoc@docsrva: r10686 - in trunk: . refman-6.0 List-Archive: http://lists.mysql.com/commits/46450 Message-Id: <200805071213.m47CDfjv012947@docsrva.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: paul Date: 2008-05-07 14:13:41 +0200 (Wed, 07 May 2008) New Revision: 10686 Log: r31173@arctic: paul | 2008-05-06 15:02:55 -0500 Add work file Added: trunk/refman-6.0/collation-tmp.xml Property changes on: trunk ___________________________________________________________________ Name: svk:merge - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828 7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:31192 b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218 bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:31171 + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828 7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:31192 b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218 bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:31173 Added: trunk/refman-6.0/collation-tmp.xml =================================================================== --- trunk/refman-6.0/collation-tmp.xml (rev 0) +++ trunk/refman-6.0/collation-tmp.xml 2008-05-07 12:13:41 UTC (rev 10686) Changed blocks: 1, Lines Added: 150, Lines Deleted: 0; 4133 bytes @@ -0,0 +1,150 @@ + + + %all.entities; +]> +
+ + How to Add a New Collation + + + collation + adding + + + + A collation is a set of rules that defines how to compare and sort + character strings. Each collation in MySQL belongs to a single + character set. A character set has at least one collation, and most + have two or more collations. + + + + This section describes how to add a collation to a character set. + The instructions assume that the character set already exists. If + the character set does not exist, see + . + + + 4.1-specific remark; for 4.1 manual only. + + + The instructions require MySQL 4.1; they do not apply to MySQL 4.0 + or older. + + + + There are several types of collation implementations in MySQL: + + + + + + + Simple collation for 8-bit character set. + + + + + + Complex collation for 8-bit character set. + + + + + + Collation for non-Unicode multi-byte character set. Characters + in the ASCII range map character codes to weights in + case-insensitive fashion. Multi-byte characters outside the + ASCII range have two types of relationship between character + codes and weights: + + + + + + + Type 1: Weights are equal to character codes. + + + + + + Type 2: There is a one-to-one mapping from character codes + to weights, but a code is not necessarily equal to the + weight. + + + + + + + + + Collation for Unicode multi-byte character set. + + + + + + + Type 1: Not based on the Unicode Collation Algorithm (UCA). + + + + + + Type 2: Based on the UCA. + + + There are several properties here. + + + + + + + + + + + The following sections describe how to add collations without + recompiling MySQL. There are instructions for adding a simple 8-bit + collation, and for adding a Unicode collation that is based on the + UCA. + + + + For instructions on adding a collation that requires recompiling, + use the instructions at . + However, instead of adding all the information required for a + complete character set, just modify existing files for the + appropriate existing character set. Add new data structures, + functions, and configuration information similar to what is already + present for existing collations. + + + + Additional resources + + + + + + + The Unicode Collation Algorithm: + + + + + + + Locale Data Markup Language: + + + + + + +