Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2e8e6bd6
Commit
2e8e6bd6
authored
Jun 11, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move UCA language specific definitions into ctype-ucs.c.
parent
51836468
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
356 additions
and
144 deletions
+356
-144
mysys/charset-def.c
mysys/charset-def.c
+23
-0
mysys/charset.c
mysys/charset.c
+0
-143
strings/ctype-uca.c
strings/ctype-uca.c
+333
-1
No files found.
mysys/charset-def.c
View file @
2e8e6bd6
...
...
@@ -22,6 +22,19 @@
init_compiled_charsets() that only adds those that he wants
*/
#ifdef HAVE_CHARSET_ucs2
extern
CHARSET_INFO
my_charset_ucs2_general_uca
;
extern
CHARSET_INFO
my_charset_ucs2_icelandic_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_latvian_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_romanian_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_slovenian_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_polish_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_estonian_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_spanish_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_swedish_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_turkish_uca_ci
;
#endif
my_bool
init_compiled_charsets
(
myf
flags
__attribute__
((
unused
)))
{
CHARSET_INFO
*
cs
;
...
...
@@ -74,6 +87,16 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation
(
&
my_charset_ucs2_general_ci
);
add_compiled_collation
(
&
my_charset_ucs2_bin
);
add_compiled_collation
(
&
my_charset_ucs2_general_uca
);
add_compiled_collation
(
&
my_charset_ucs2_general_uca
);
add_compiled_collation
(
&
my_charset_ucs2_icelandic_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_latvian_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_romanian_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_slovenian_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_polish_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_estonian_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_spanish_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_swedish_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_turkish_uca_ci
);
#endif
#ifdef HAVE_CHARSET_ujis
...
...
mysys/charset.c
View file @
2e8e6bd6
...
...
@@ -177,127 +177,6 @@ static int cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
}
#ifdef HAVE_CHARSET_ucs2
typedef
struct
my_tailoring_st
{
uint
number
;
const
char
*
name
;
const
char
*
tailoring
;
}
my_tailoring
;
static
my_tailoring
tailoring
[]
=
{
{
0
,
"icelandic"
,
/*
Some sources treat LETTER A WITH DIARESIS (00E4,00C4)
secondary greater than LETTER AE (00E6,00C6).
http://www.evertype.com/alphabets/icelandic.pdf
http://developer.mimer.com/collations/charts/icelandic.htm
Other sources do not provide any special rules
for LETTER A WITH DIARESIS:
http://www.omniglot.com/writing/icelandic.htm
http://en.wikipedia.org/wiki/Icelandic_alphabet
http://oss.software.ibm.com/icu/charts/collation/is.html
Let's go the first way.
*/
"& A <
\\
u00E1 <<<
\\
u00C1 "
"& D <
\\
u00F0 <<<
\\
u00D0 "
"& E <
\\
u00E9 <<<
\\
u00C9 "
"& I <
\\
u00ED <<<
\\
u00CD "
"& O <
\\
u00F3 <<<
\\
u00D3 "
"& U <
\\
u00FA <<<
\\
u00DA "
"& Y <
\\
u00FD <<<
\\
u00DD "
"& Z <
\\
u00FE <<<
\\
u00DE "
"<
\\
u00E6 <<<
\\
u00C6 <<
\\
u00E4 <<<
\\
u00C4 "
"<
\\
u00F6 <<<
\\
u00D6 <<
\\
u00F8 <<<
\\
u00D8 "
"<
\\
u00E5 <<<
\\
u00C5 "
},
{
1
,
"latvian"
,
/*
Some sources treat I and Y primary different.
Other sources treat I and Y the same on primary level.
We'll go the first way.
*/
"& C <
\\
u010D <<<
\\
u010C "
"& G <
\\
u0123 <<<
\\
u0122 "
"& I <
\\
u0079 <<<
\\
u0059 "
"& K <
\\
u0137 <<<
\\
u0136 "
"& L <
\\
u013C <<<
\\
u013B "
"& N <
\\
u0146 <<<
\\
u0145 "
"& R <
\\
u0157 <<<
\\
u0156 "
"& S <
\\
u0161 <<<
\\
u0160 "
"& Z <
\\
u017E <<<
\\
u017D "
},
{
2
,
"romanian"
,
"& A <
\\
u0103 <<<
\\
u0102 <
\\
u00E2 <<<
\\
u00C2 "
"& I <
\\
u00EE <<<
\\
u00CE "
"& S <
\\
u0219 <<<
\\
u0218 <<
\\
u015F <<<
\\
u015E "
"& T <
\\
u021B <<<
\\
u021A <<
\\
u0163 <<<
\\
u0162 "
},
{
3
,
"slovenian"
,
"& C <
\\
u010D <<<
\\
u010C "
"& S <
\\
u0161 <<<
\\
u0160 "
"& Z <
\\
u017E <<<
\\
u017D "
},
{
4
,
"polish"
,
"& A <
\\
u0105 <<<
\\
u0104 "
"& C <
\\
u0107 <<<
\\
u0106 "
"& E <
\\
u0119 <<<
\\
u0118 "
"& L <
\\
u0142 <<<
\\
u0141 "
"& N <
\\
u0144 <<<
\\
u0143 "
"& O <
\\
u00F3 <<<
\\
u00D3 "
"& S <
\\
u015B <<<
\\
u015A "
"& Z <
\\
u017A <<<
\\
u017B "
},
{
5
,
"estonian"
,
"& S <
\\
u0161 <<<
\\
u0160 "
" <
\\
u007A <<<
\\
u005A "
" <
\\
u017E <<<
\\
u017D "
"& W <
\\
u00F5 <<<
\\
u00D5 "
"<
\\
u00E4 <<<
\\
u00C4 "
"<
\\
u00F6 <<<
\\
u00D6 "
"<
\\
u00FC <<<
\\
u00DC "
},
{
6
,
"spanish"
,
"& N <
\\
u00F1 <<<
\\
u00D1 "
},
{
7
,
"swedish"
,
/*
Some sources treat V and W as similar on primary level.
We'll treat V and W as different on primary level.
*/
"& Y <<
\\
u00FC <<<
\\
u00DC "
"& Z <
\\
u00E5 <<<
\\
u00C5 "
"<
\\
u00E4 <<<
\\
u00C4 <<
\\
u00E6 <<<
\\
u00C6 "
"<
\\
u00F6 <<<
\\
u00D6 <<
\\
u00F8 <<<
\\
u00D8 "
},
{
8
,
"turkish"
,
"& C <
\\
u00E7 <<<
\\
u00C7 "
"& G <
\\
u011F <<<
\\
u011E "
"& H <
\\
u0131 <<<
\\
u0049 "
"& O <
\\
u00F6 <<<
\\
u00D6 "
"& S <
\\
u015F <<<
\\
u015E "
"& U <
\\
u00FC <<<
\\
u00DC "
},
{
0
,
NULL
,
NULL
}
};
#endif
static
my_bool
simple_cs_is_full
(
CHARSET_INFO
*
cs
)
{
...
...
@@ -393,25 +272,6 @@ static int add_collation(CHARSET_INFO *cs)
return
MY_XML_OK
;
}
#ifdef HAVE_CHARSET_ucs2
static
my_bool
init_uca_charsets
()
{
my_tailoring
*
t
;
CHARSET_INFO
cs
=
my_charset_ucs2_general_uca
;
char
name
[
64
];
cs
.
state
=
MY_CS_STRNXFRM
|
MY_CS_UNICODE
;
for
(
t
=
tailoring
;
t
->
tailoring
;
t
++
)
{
cs
.
number
=
128
+
t
->
number
;
cs
.
tailoring
=
t
->
tailoring
;
cs
.
name
=
name
;
sprintf
(
name
,
"ucs2_%s_ci"
,
t
->
name
);
add_collation
(
&
cs
);
}
return
0
;
}
#endif
#define MY_MAX_ALLOWED_BUF 1024*1024
#define MY_CHARSET_INDEX "Index.xml"
...
...
@@ -515,9 +375,6 @@ static my_bool init_available_charsets(myf myflags)
bzero
(
&
all_charsets
,
sizeof
(
all_charsets
));
init_compiled_charsets
(
myflags
);
#ifdef HAVE_CHARSET_ucs2
init_uca_charsets
();
#endif
/* Copy compiled charsets */
for
(
cs
=
all_charsets
;
...
...
strings/ctype-uca.c
View file @
2e8e6bd6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment