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
296d4b2f
Commit
296d4b2f
authored
Mar 23, 2006
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#15376: Unassigned multibyte codes are converted to U+0000
Mergeing changes into 5.0
parent
36e92839
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
22 deletions
+45
-22
mysql-test/r/ctype_eucjpms.result
mysql-test/r/ctype_eucjpms.result
+6
-0
mysql-test/r/ctype_ujis.result
mysql-test/r/ctype_ujis.result
+6
-6
mysql-test/t/ctype_eucjpms.test
mysql-test/t/ctype_eucjpms.test
+17
-0
strings/ctype-cp932.c
strings/ctype-cp932.c
+3
-3
strings/ctype-eucjpms.c
strings/ctype-eucjpms.c
+13
-13
No files found.
mysql-test/r/ctype_eucjpms.result
View file @
296d4b2f
...
...
@@ -9819,3 +9819,9 @@ eucjpms_bin 6109
eucjpms_bin 61
eucjpms_bin 6120
drop table t1;
select hex(convert(_eucjpms 0xA5FE41 using ucs2));
hex(convert(_eucjpms 0xA5FE41 using ucs2))
003F0041
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2))
003F0041
mysql-test/r/ctype_ujis.result
View file @
296d4b2f
...
...
@@ -2307,6 +2307,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h
ab_def
drop table t1;
select hex(convert(_ujis 0xA5FE41 using ucs2));
hex(convert(_ujis 0xA5FE41 using ucs2))
003F0041
select hex(convert(_ujis 0x8FABF841 using ucs2));
hex(convert(_ujis 0x8FABF841 using ucs2))
003F0041
DROP TABLE IF EXISTS t1, t2;
DROP PROCEDURE IF EXISTS sp1;
set names ujis;
...
...
@@ -2337,9 +2343,3 @@ DROP TABLE t2;
set names default;
set character_set_database=default;
set character_set_server=default;
select hex(convert(_ujis 0xA5FE41 using ucs2));
hex(convert(_ujis 0xA5FE41 using ucs2))
003F0041
select hex(convert(_ujis 0x8FABF841 using ucs2));
hex(convert(_ujis 0x8FABF841 using ucs2))
003F0041
mysql-test/t/ctype_eucjpms.test
View file @
296d4b2f
...
...
@@ -363,3 +363,20 @@ SET collation_connection='eucjpms_japanese_ci';
--
source
include
/
ctype_filesort
.
inc
SET
collation_connection
=
'eucjpms_bin'
;
--
source
include
/
ctype_filesort
.
inc
#
# Bugs#15375: Unassigned multibyte codes are broken
# into parts when converting to Unicode.
# This query should return 0x003F0041. I.e. it should
# scan unassigned double-byte character 0xA5FE, convert
# it as QUESTION MARK 0x003F and then scan the next
# character, which is a single byte character 0x41.
#
select
hex
(
convert
(
_eucjpms
0xA5FE41
using
ucs2
));
# This one should return 0x003F0041:
# scan unassigned three-byte character 0x8FABF8,
# convert it as QUESTION MARK 0x003F and then scan
# the next character, which is a single byte character 0x41.
select
hex
(
convert
(
_eucjpms
0x8FABF841
using
ucs2
));
strings/ctype-cp932.c
View file @
296d4b2f
...
...
@@ -5355,7 +5355,7 @@ my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
int
hi
=
s
[
0
];
if
(
s
>=
e
)
return
MY_CS_TOO
FEW
(
0
)
;
return
MY_CS_TOO
SMALL
;
if
(
hi
<
0x80
)
{
...
...
@@ -5370,10 +5370,10 @@ my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
}
if
(
s
+
2
>
e
)
return
MY_CS_TOO
FEW
(
0
)
;
return
MY_CS_TOO
SMALL2
;
if
(
!
(
pwc
[
0
]
=
func_cp932_uni_onechar
((
hi
<<
8
)
+
s
[
1
])))
return
MY_CS_ILSEQ
;
return
-
2
;
return
2
;
}
...
...
strings/ctype-eucjpms.c
View file @
296d4b2f
...
...
@@ -243,7 +243,7 @@ my_mb_wc_jisx0201(CHARSET_INFO *cs __attribute__((unused)),
const
uchar
*
e
__attribute__
((
unused
)))
{
wc
[
0
]
=
tab_jisx0201_uni
[
*
s
];
return
(
!
wc
[
0
]
&&
s
[
0
])
?
MY_CS_ILSEQ
:
1
;
return
(
!
wc
[
0
]
&&
s
[
0
])
?
-
1
:
1
;
}
...
...
@@ -8473,7 +8473,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
int
c1
,
c2
,
c3
;
if
(
s
>=
e
)
return
MY_CS_TOO
FEW
(
0
)
;
return
MY_CS_TOO
SMALL
;
c1
=
s
[
0
];
...
...
@@ -8485,7 +8485,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
}
if
(
s
+
2
>
e
)
return
MY_CS_TOO
FEW
(
0
)
;
return
MY_CS_TOO
SMALL2
;
c2
=
s
[
1
];
...
...
@@ -8500,7 +8500,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
{
pwc
[
0
]
=
my_jisx0208_uni_onechar
(
((
c1
-
0x80
)
<<
8
)
+
(
c2
-
0x80
));
if
(
!
pwc
[
0
])
return
MY_CS_ILSEQ
;
return
-
2
;
}
else
{
...
...
@@ -8520,7 +8520,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
ret
=
my_mb_wc_jisx0201
(
cs
,
pwc
,
s
+
1
,
e
);
if
(
ret
!=
1
)
return
ret
;
return
-
2
;
return
2
;
}
...
...
@@ -8531,7 +8531,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
return
MY_CS_ILSEQ
;
if
(
s
+
3
>
e
)
return
MY_CS_TOO
FEW
(
0
)
;
return
MY_CS_TOO
SMALL3
;
c3
=
s
[
2
];
if
(
c3
<
0xA1
||
c3
>=
0xFF
)
...
...
@@ -8540,8 +8540,8 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
if
(
c2
<
0xF5
)
{
pwc
[
0
]
=
my_jisx0212_uni_onechar
((
c2
-
0x80
)
*
256
+
(
c3
-
0x80
));
if
(
!
pwc
)
return
MY_CS_ILSEQ
;
if
(
!
pwc
[
0
]
)
return
-
3
;
}
else
{
...
...
@@ -8572,7 +8572,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if
((
jp
=
my_uni_jisx0208_onechar
(
wc
)))
{
if
(
s
+
2
>
e
)
return
MY_CS_TOOSMALL
;
return
MY_CS_TOOSMALL
2
;
jp
+=
0x8080
;
s
[
0
]
=
jp
>>
8
;
...
...
@@ -8584,7 +8584,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if
(
my_wc_mb_jisx0201
(
c
,
wc
,
s
,
e
)
==
1
)
{
if
(
s
+
2
>
e
)
return
MY_CS_TOOSMALL
;
return
MY_CS_TOOSMALL
2
;
s
[
1
]
=
s
[
0
];
s
[
0
]
=
0x8E
;
return
2
;
...
...
@@ -8594,7 +8594,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if
((
jp
=
my_uni_jisx0212_onechar
(
wc
)))
{
if
(
s
+
3
>
e
)
return
MY_CS_TOOSMALL
;
return
MY_CS_TOOSMALL
3
;
jp
+=
0x8080
;
s
[
0
]
=
0x8F
;
...
...
@@ -8608,7 +8608,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if
(
wc
>=
0xE000
&&
wc
<
0xE3AC
)
{
if
(
s
+
2
>
e
)
return
MY_CS_TOOSMALL
;
return
MY_CS_TOOSMALL
2
;
c1
=
((
unsigned
)(
wc
-
0xE000
)
/
94
)
+
0xF5
;
s
[
0
]
=
c1
;
...
...
@@ -8622,7 +8622,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if
(
wc
>=
0xE3AC
&&
wc
<
0xE758
)
{
if
(
s
+
3
>
e
)
return
MY_CS_TOOSMALL
;
return
MY_CS_TOOSMALL
3
;
s
[
0
]
=
0x8F
;
c1
=
((
unsigned
)(
wc
-
0xE3AC
)
/
94
)
+
0xF5
;
...
...
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