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
134b5c7d
Commit
134b5c7d
authored
Sep 13, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Persian collation, contibuted by Jody McIntyre
parent
3b7378f9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
665 additions
and
3 deletions
+665
-3
configure.in
configure.in
+2
-2
mysql-test/r/ctype_uca.result
mysql-test/r/ctype_uca.result
+374
-0
mysql-test/t/ctype_uca.test
mysql-test/t/ctype_uca.test
+191
-0
mysys/charset-def.c
mysys/charset-def.c
+4
-0
strings/ctype-uca.c
strings/ctype-uca.c
+94
-1
No files found.
configure.in
View file @
134b5c7d
...
...
@@ -2715,7 +2715,7 @@ case $default_charset in
define
(
UCSC2, ucs2_czech_ci ucs2_danish_ci
)
define
(
UCSC3, ucs2_estonian_ci ucs2_icelandic_ci
)
define
(
UCSC4, ucs2_latvian_ci ucs2_lithuanian_ci
)
define
(
UCSC5, ucs2_polish_ci ucs2_romanian_ci
)
define
(
UCSC5, ucs2_p
ersian_ci ucs2_p
olish_ci ucs2_romanian_ci
)
define
(
UCSC6, ucs2_slovak_ci ucs2_slovenian_ci
)
define
(
UCSC7, ucs2_spanish2_ci ucs2_spanish_ci
)
define
(
UCSC8, ucs2_swedish_ci ucs2_turkish_ci
)
...
...
@@ -2733,7 +2733,7 @@ case $default_charset in
define
(
UTFC2, utf8_czech_ci utf8_danish_ci
)
define
(
UTFC3, utf8_estonian_ci utf8_icelandic_ci
)
define
(
UTFC4, utf8_latvian_ci utf8_lithuanian_ci
)
define
(
UTFC5, utf8_polish_ci utf8_romanian_ci
)
define
(
UTFC5, utf8_p
ersian_ci utf8_p
olish_ci utf8_romanian_ci
)
define
(
UTFC6, utf8_slovak_ci utf8_slovenian_ci
)
define
(
UTFC7, utf8_spanish2_ci utf8_spanish_ci
)
define
(
UTFC8, utf8_swedish_ci utf8_turkish_ci
)
...
...
mysql-test/r/ctype_uca.result
View file @
134b5c7d
This diff is collapsed.
Click to expand it.
mysql-test/t/ctype_uca.test
View file @
134b5c7d
This diff is collapsed.
Click to expand it.
mysys/charset-def.c
View file @
134b5c7d
...
...
@@ -39,6 +39,7 @@ extern CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci;
extern
CHARSET_INFO
my_charset_ucs2_slovak_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_spanish2_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_roman_uca_ci
;
extern
CHARSET_INFO
my_charset_ucs2_persian_uca_ci
;
#endif
#ifdef HAVE_CHARSET_utf8
...
...
@@ -58,6 +59,7 @@ extern CHARSET_INFO my_charset_utf8_lithuanian_uca_ci;
extern
CHARSET_INFO
my_charset_utf8_slovak_uca_ci
;
extern
CHARSET_INFO
my_charset_utf8_spanish2_uca_ci
;
extern
CHARSET_INFO
my_charset_utf8_roman_uca_ci
;
extern
CHARSET_INFO
my_charset_utf8_persian_uca_ci
;
#endif
my_bool
init_compiled_charsets
(
myf
flags
__attribute__
((
unused
)))
...
...
@@ -127,6 +129,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation
(
&
my_charset_ucs2_slovak_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_spanish2_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_roman_uca_ci
);
add_compiled_collation
(
&
my_charset_ucs2_persian_uca_ci
);
#endif
#ifdef HAVE_CHARSET_ujis
...
...
@@ -153,6 +156,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation
(
&
my_charset_utf8_slovak_uca_ci
);
add_compiled_collation
(
&
my_charset_utf8_spanish2_uca_ci
);
add_compiled_collation
(
&
my_charset_utf8_roman_uca_ci
);
add_compiled_collation
(
&
my_charset_utf8_persian_uca_ci
);
#endif
/* Copy compiled charsets */
...
...
strings/ctype-uca.c
View file @
134b5c7d
...
...
@@ -6657,6 +6657,42 @@ static const char roman[]= /* i.e. Classical Latin */
"& I << j <<< J "
"& V << u <<< U "
;
/*
Persian collation support was provided by
Jody McIntyre <mysql@modernduck.com>
To: internals@lists.mysql.com
Subject: Persian UTF8 collation support
Date: 17.08.2004
Contraction is not implemented. Some implementations do perform
contraction but others do not, and it is able to sort all my test
strings correctly.
Jody.
*/
static
const
char
persian
[]
=
"&
\\
u066D <
\\
u064E <
\\
uFE76 <
\\
uFE77 <
\\
u0650 <
\\
uFE7A <
\\
uFE7B"
" <
\\
u064F <
\\
uFE78 <
\\
uFE79 <
\\
u064B <
\\
uFE70 <
\\
uFE71"
" <
\\
u064D <
\\
uFE74 <
\\
u064C <
\\
uFE72"
"&
\\
uFE7F <
\\
u0653 <
\\
u0654 <
\\
u0655 <
\\
u0670"
"&
\\
u0669 <
\\
u0622 <
\\
u0627 <
\\
u0671 <
\\
u0621 <
\\
u0623 <
\\
u0625"
" <
\\
u0624 <
\\
u0626"
"&
\\
u0642 <
\\
u06A9 <
\\
u0643"
"&
\\
u0648 <
\\
u0647 <
\\
u0629 <
\\
u06C0 <
\\
u06CC <
\\
u0649 <
\\
u064A"
"&
\\
uFE80 <
\\
uFE81 <
\\
uFE82 <
\\
uFE8D <
\\
uFE8E <
\\
uFB50 <
\\
uFB51"
" <
\\
uFE80 <
\\
uFE83 <
\\
uFE84 <
\\
uFE87 <
\\
uFE88 <
\\
uFE85"
" <
\\
uFE86 <
\\
u0689 <
\\
u068A"
"&
\\
uFEAE <
\\
uFDFC"
"&
\\
uFED8 <
\\
uFB8E <
\\
uFB8F <
\\
uFB90 <
\\
uFB91 <
\\
uFED9 <
\\
uFEDA"
" <
\\
uFEDB <
\\
uFEDC"
"&
\\
uFEEE <
\\
uFEE9 <
\\
uFEEA <
\\
uFEEB <
\\
uFEEC <
\\
uFE93 <
\\
uFE94"
" <
\\
uFBA4 <
\\
uFBA5 <
\\
uFBFC <
\\
uFBFD <
\\
uFBFE <
\\
uFBFF"
" <
\\
uFEEF <
\\
uFEF0 <
\\
uFEF1 <
\\
uFEF2 <
\\
uFEF3 <
\\
uFEF4"
" <
\\
uFEF5 <
\\
uFEF6 <
\\
uFEF7 <
\\
uFEF8 <
\\
uFEF9 <
\\
uFEFA"
" <
\\
uFEFB <
\\
uFEFC"
;
/*
Unicode Collation Algorithm:
Collation element (weight) scanner,
...
...
@@ -7671,7 +7707,7 @@ static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems,
return
(
size_t
)
nitems
;
}
#define MY_MAX_COLL_RULE
64
#define MY_MAX_COLL_RULE
128
/*
This function copies an UCS2 collation from
...
...
@@ -8360,6 +8396,35 @@ CHARSET_INFO my_charset_ucs2_roman_uca_ci=
&
my_collation_ucs2_uca_handler
};
CHARSET_INFO
my_charset_ucs2_persian_uca_ci
=
{
144
,
0
,
0
,
/* number */
MY_CS_COMPILED
|
MY_CS_STRNXFRM
|
MY_CS_UNICODE
,
"ucs2"
,
/* cs name */
"ucs2_persian_ci"
,
/* name */
""
,
/* comment */
persian
,
/* tailoring */
NULL
,
/* ctype */
NULL
,
/* to_lower */
NULL
,
/* to_upper */
NULL
,
/* sort_order */
NULL
,
/* contractions */
NULL
,
/* sort_order_big*/
NULL
,
/* tab_to_uni */
NULL
,
/* tab_from_uni */
NULL
,
/* state_map */
NULL
,
/* ident_map */
8
,
/* strxfrm_multiply */
2
,
/* mbminlen */
2
,
/* mbmaxlen */
9
,
/* min_sort_char */
0xFFFF
,
/* max_sort_char */
&
my_charset_ucs2_handler
,
&
my_collation_ucs2_uca_handler
};
#endif
...
...
@@ -8838,4 +8903,32 @@ CHARSET_INFO my_charset_utf8_roman_uca_ci=
&
my_charset_utf8_handler
,
&
my_collation_any_uca_handler
};
CHARSET_INFO
my_charset_utf8_persian_uca_ci
=
{
208
,
0
,
0
,
/* number */
MY_CS_COMPILED
|
MY_CS_STRNXFRM
|
MY_CS_UNICODE
,
"utf8"
,
/* cs name */
"utf8_persian_ci"
,
/* name */
""
,
/* comment */
persian
,
/* tailoring */
ctype_utf8
,
/* ctype */
NULL
,
/* to_lower */
NULL
,
/* to_upper */
NULL
,
/* sort_order */
NULL
,
/* contractions */
NULL
,
/* sort_order_big*/
NULL
,
/* tab_to_uni */
NULL
,
/* tab_from_uni */
NULL
,
/* state_map */
NULL
,
/* ident_map */
8
,
/* strxfrm_multiply */
1
,
/* mbminlen */
2
,
/* mbmaxlen */
9
,
/* min_sort_char */
0xFFFF
,
/* max_sort_char */
&
my_charset_utf8_handler
,
&
my_collation_any_uca_handler
};
#endif
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