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
af4ff07f
Commit
af4ff07f
authored
Mar 25, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#3290: Can't convert sjis&ujis half-width katakana correctly
parent
4cdc50de
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
1 deletion
+96
-1
mysql-test/include/have_sjis.inc
mysql-test/include/have_sjis.inc
+4
-0
mysql-test/r/ctype_sjis.result
mysql-test/r/ctype_sjis.result
+43
-0
mysql-test/r/have_sjis.require
mysql-test/r/have_sjis.require
+2
-0
mysql-test/t/ctype_sjis.test
mysql-test/t/ctype_sjis.test
+34
-0
strings/ctype-sjis.c
strings/ctype-sjis.c
+13
-1
No files found.
mysql-test/include/have_sjis.inc
0 → 100644
View file @
af4ff07f
--
require
r
/
have_sjis
.
require
disable_query_log
;
show
collation
like
"sjis_japanese_ci"
;
enable_query_log
;
mysql-test/r/ctype_sjis.result
0 → 100644
View file @
af4ff07f
drop table if exists t1;
set names sjis;
select 'a' like 'a';
'a' like 'a'
1
select 'A' like 'a';
'A' like 'a'
1
select 'A' like 'a' collate sjis_bin;
'A' like 'a' collate sjis_bin
0
set @sjis1= _sjis 0xa1a2a3a4a5a6a7a8a9aaabacadaeaf;
set @sjis2= _sjis 0xb0b1b2b3b4b5b6b7b8b9babbbcbdbebf;
set @sjis3= _sjis 0xc0c1c2c3c4c5c6c7c8c9cacbcccdcecf;
set @sjis4= _sjis 0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf;
set @utf81= CONVERT(@sjis1 USING utf8);
set @utf82= CONVERT(@sjis2 USING utf8);
set @utf83= CONVERT(@sjis3 USING utf8);
set @utf84= CONVERT(@sjis4 USING utf8);
select hex(@utf81);
hex(@utf81)
EFBDA1EFBDA2EFBDA3EFBDA4EFBDA5EFBDA6EFBDA7EFBDA8EFBDA9EFBDAAEFBDABEFBDACEFBDADEFBDAEEFBDAF
select hex(@utf82);
hex(@utf82)
EFBDB0EFBDB1EFBDB2EFBDB3EFBDB4EFBDB5EFBDB6EFBDB7EFBDB8EFBDB9EFBDBAEFBDBBEFBDBCEFBDBDEFBDBEEFBDBF
select hex(@utf83);
hex(@utf83)
EFBE80EFBE81EFBE82EFBE83EFBE84EFBE85EFBE86EFBE87EFBE88EFBE89EFBE8AEFBE8BEFBE8CEFBE8DEFBE8EEFBE8F
select hex(@utf84);
hex(@utf84)
EFBE90EFBE91EFBE92EFBE93EFBE94EFBE95EFBE96EFBE97EFBE98EFBE99EFBE9AEFBE9BEFBE9CEFBE9DEFBE9EEFBE9F
select hex(CONVERT(@utf81 USING sjis));
hex(CONVERT(@utf81 USING sjis))
A1A2A3A4A5A6A7A8A9AAABACADAEAF
select hex(CONVERT(@utf82 USING sjis));
hex(CONVERT(@utf82 USING sjis))
B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF
select hex(CONVERT(@utf83 USING sjis));
hex(CONVERT(@utf83 USING sjis))
C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF
select hex(CONVERT(@utf84 USING sjis));
hex(CONVERT(@utf84 USING sjis))
D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF
mysql-test/r/have_sjis.require
0 → 100644
View file @
af4ff07f
Collation Charset Id Default Compiled Sortlen
sjis_japanese_ci sjis 13 Yes Yes 1
mysql-test/t/ctype_sjis.test
0 → 100644
View file @
af4ff07f
--
source
include
/
have_sjis
.
inc
#
# Tests with the sjis character set
#
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
set
names
sjis
;
select
'a'
like
'a'
;
select
'A'
like
'a'
;
select
'A'
like
'a'
collate
sjis_bin
;
set
@
sjis1
=
_sjis
0xa1a2a3a4a5a6a7a8a9aaabacadaeaf
;
set
@
sjis2
=
_sjis
0xb0b1b2b3b4b5b6b7b8b9babbbcbdbebf
;
set
@
sjis3
=
_sjis
0xc0c1c2c3c4c5c6c7c8c9cacbcccdcecf
;
set
@
sjis4
=
_sjis
0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf
;
set
@
utf81
=
CONVERT
(
@
sjis1
USING
utf8
);
set
@
utf82
=
CONVERT
(
@
sjis2
USING
utf8
);
set
@
utf83
=
CONVERT
(
@
sjis3
USING
utf8
);
set
@
utf84
=
CONVERT
(
@
sjis4
USING
utf8
);
select
hex
(
@
utf81
);
select
hex
(
@
utf82
);
select
hex
(
@
utf83
);
select
hex
(
@
utf84
);
select
hex
(
CONVERT
(
@
utf81
USING
sjis
));
select
hex
(
CONVERT
(
@
utf82
USING
sjis
));
select
hex
(
CONVERT
(
@
utf83
USING
sjis
));
select
hex
(
CONVERT
(
@
utf84
USING
sjis
));
strings/ctype-sjis.c
View file @
af4ff07f
...
@@ -4437,6 +4437,12 @@ my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
...
@@ -4437,6 +4437,12 @@ my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
if
(
!
(
code
=
func_uni_sjis_onechar
(
wc
)))
if
(
!
(
code
=
func_uni_sjis_onechar
(
wc
)))
return
MY_CS_ILUNI
;
return
MY_CS_ILUNI
;
if
(
code
>=
0xA1
&&
code
<=
0xDF
)
{
s
[
0
]
=
code
;
return
1
;
}
if
(
s
+
2
>
e
)
if
(
s
+
2
>
e
)
return
MY_CS_TOOSMALL
;
return
MY_CS_TOOSMALL
;
...
@@ -4454,12 +4460,18 @@ my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
...
@@ -4454,12 +4460,18 @@ my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
if
(
s
>=
e
)
if
(
s
>=
e
)
return
MY_CS_TOOFEW
(
0
);
return
MY_CS_TOOFEW
(
0
);
if
(
hi
<
0x80
)
if
(
hi
<
0x80
)
{
{
pwc
[
0
]
=
hi
;
pwc
[
0
]
=
hi
;
return
1
;
return
1
;
}
}
if
(
hi
>=
0xA1
&&
hi
<=
0xDF
)
{
pwc
[
0
]
=
func_sjis_uni_onechar
(
hi
);
return
1
;
}
if
(
s
+
2
>
e
)
if
(
s
+
2
>
e
)
return
MY_CS_TOOFEW
(
0
);
return
MY_CS_TOOFEW
(
0
);
...
...
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