Associate a charset directly with its number in the Index file, and

propogate those changes through the code.  This is so that there can
be holes in the list of charsets without breaking old tables.


configure.in:
  - changed pattern for getting number from charsets Index file
mysys/charset.c:
  - changed from using a TYPELIB to a CS_ID struct, so both the name
    and the number of a charset is stored in available_charsets
sql/share/charsets/Index:
  - made the number a real part of the Index file, not just a comment
sql/share/charsets/README:
  - order is no longer significant, but each charset must be paired
    with its number
This commit is contained in:
unknown 2000-08-22 16:08:34 -04:00
commit db3b3c1799
4 changed files with 97 additions and 83 deletions

View file

@ -2,36 +2,33 @@
#
# This file lists all of the available character sets.
# THE ORDER IN WHICH CHARACTER SETS ARE LISTED IS IMPORTANT. See the
# README file in this directory for details.
big5 # 1
czech # 2
dec8 # 3
dos # 4
german1 # 5
hp8 # 6
koi8_ru # 7
latin1 # 8
latin2 # 9
swe7 # 10
usa7 # 11
ujis # 12
sjis # 13
cp1251 # 14
danish # 15
hebrew # 16
win1251 # 17
tis620 # 18
euc_kr # 19
estonia # 20
hungarian # 21
koi8_ukr # 22
win1251ukr # 23
gb2312 # 24
greek # 25
win1250 # 26
croat # 27
gbk # 28
cp1257 # 29
big5 1
czech 2
dec8 3
dos 4
german1 5
hp8 6
koi8_ru 7
latin1 8
latin2 9
swe7 10
usa7 11
ujis 12
sjis 13
cp1251 14
danish 15
hebrew 16
win1251 17
tis620 18
euc_kr 19
estonia 20
hungarian 21
koi8_ukr 22
win1251ukr 23
gb2312 24
greek 25
win1250 26
croat 27
gbk 28
cp1257 29

View file

@ -9,10 +9,9 @@ different character sets. It contains:
Index
The Index file lists all of the available charset configurations.
THE ORDER OF THE CHARACTER SETS IN THIS FILE IS SIGNIFICANT.
The first character set is number 1, the second is number 2, etc. The
number is stored IN THE DATABASE TABLE FILES and must not be changed.
Always add new character sets to the end of the list, so that the
Each charset is paired with a number. The number is stored
IN THE DATABASE TABLE FILES and must not be changed. Always
add new character sets to the end of the list, so that the
numbers of the other character sets will not be changed.
Compiled in or configuration file?
@ -39,5 +38,3 @@ Syntax of configuration files
number in hexadecimal format. The ctype array takes up the first
257 words; the to_lower, to_upper and sort_order arrays take up 256
words each after that.
The Index file is simply a list of the available character sets.