summaryrefslogtreecommitdiff
path: root/src/test/regress
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>2007-03-25 11:56:04 +0000
committerTatsuo Ishii <ishii@postgresql.org>2007-03-25 11:56:04 +0000
commit75c6519ff68dbb97f73b13e9976fb8075bbde7b8 (patch)
treed95c6042cbfd31afed765e2ca9b9703f0faa1391 /src/test/regress
parent7b4726e6c3a275d39ffb5d01b7c8a386be036ada (diff)
downloadpostgresql-75c6519ff68dbb97f73b13e9976fb8075bbde7b8.tar.gz
Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004,
along with new conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8. catalog version has been bump up.
Diffstat (limited to 'src/test/regress')
-rw-r--r--src/test/regress/expected/conversion.out78
-rw-r--r--src/test/regress/sql/conversion.sql18
2 files changed, 96 insertions, 0 deletions
diff --git a/src/test/regress/expected/conversion.out b/src/test/regress/expected/conversion.out
index 00a1ecf638..cd3f0e2c48 100644
--- a/src/test/regress/expected/conversion.out
+++ b/src/test/regress/expected/conversion.out
@@ -1642,6 +1642,84 @@ SELECT CONVERT('foo', 'WIN1257', 'UTF8');
foo
(1 row)
+-- UTF8 --> EUC_JIS_2004
+SELECT CONVERT('foo' USING utf8_to_euc_jis_2004);
+ convert_using
+---------------
+ foo
+(1 row)
+
+SELECT CONVERT('foo', 'UTF8', 'EUC_JIS_2004');
+ convert
+---------
+ foo
+(1 row)
+
+-- EUC_JIS_2004 --> UTF8
+SELECT CONVERT('foo' USING euc_jis_2004_to_utf8);
+ convert_using
+---------------
+ foo
+(1 row)
+
+SELECT CONVERT('foo', 'EUC_JIS_2004', 'UTF8');
+ convert
+---------
+ foo
+(1 row)
+
+-- UTF8 --> SHIFT_JIS_2004
+SELECT CONVERT('foo' USING utf8_to_euc_jis_2004);
+ convert_using
+---------------
+ foo
+(1 row)
+
+SELECT CONVERT('foo', 'UTF8', 'SHIFT_JIS_2004');
+ convert
+---------
+ foo
+(1 row)
+
+-- SHIFT_JIS_2004 --> UTF8
+SELECT CONVERT('foo' USING shift_jis_2004_to_utf8);
+ convert_using
+---------------
+ foo
+(1 row)
+
+SELECT CONVERT('foo', 'SHIFT_JIS_2004', 'UTF8');
+ convert
+---------
+ foo
+(1 row)
+
+-- EUC_JIS_2004 --> SHIFT_JIS_2004
+SELECT CONVERT('foo' USING euc_jis_2004_to_shift_jis_2004);
+ convert_using
+---------------
+ foo
+(1 row)
+
+SELECT CONVERT('foo', 'EUC_JIS_2004', 'SHIFT_JIS_2004');
+ convert
+---------
+ foo
+(1 row)
+
+-- SHIFT_JIS_2004 --> EUC_JIS_2004
+SELECT CONVERT('foo' USING shift_jis_2004_to_euc_jis_2004);
+ convert_using
+---------------
+ foo
+(1 row)
+
+SELECT CONVERT('foo', 'SHIFT_JIS_2004', 'EUC_JIS_2004');
+ convert
+---------
+ foo
+(1 row)
+
--
-- return to the super user
--
diff --git a/src/test/regress/sql/conversion.sql b/src/test/regress/sql/conversion.sql
index 64a4ca5650..be5c8628f5 100644
--- a/src/test/regress/sql/conversion.sql
+++ b/src/test/regress/sql/conversion.sql
@@ -399,6 +399,24 @@ SELECT CONVERT('foo', 'UTF8', 'WIN1257');
-- WIN1257 --> UTF8
SELECT CONVERT('foo' USING windows_1257_to_utf8);
SELECT CONVERT('foo', 'WIN1257', 'UTF8');
+-- UTF8 --> EUC_JIS_2004
+SELECT CONVERT('foo' USING utf8_to_euc_jis_2004);
+SELECT CONVERT('foo', 'UTF8', 'EUC_JIS_2004');
+-- EUC_JIS_2004 --> UTF8
+SELECT CONVERT('foo' USING euc_jis_2004_to_utf8);
+SELECT CONVERT('foo', 'EUC_JIS_2004', 'UTF8');
+-- UTF8 --> SHIFT_JIS_2004
+SELECT CONVERT('foo' USING utf8_to_euc_jis_2004);
+SELECT CONVERT('foo', 'UTF8', 'SHIFT_JIS_2004');
+-- SHIFT_JIS_2004 --> UTF8
+SELECT CONVERT('foo' USING shift_jis_2004_to_utf8);
+SELECT CONVERT('foo', 'SHIFT_JIS_2004', 'UTF8');
+-- EUC_JIS_2004 --> SHIFT_JIS_2004
+SELECT CONVERT('foo' USING euc_jis_2004_to_shift_jis_2004);
+SELECT CONVERT('foo', 'EUC_JIS_2004', 'SHIFT_JIS_2004');
+-- SHIFT_JIS_2004 --> EUC_JIS_2004
+SELECT CONVERT('foo' USING shift_jis_2004_to_euc_jis_2004);
+SELECT CONVERT('foo', 'SHIFT_JIS_2004', 'EUC_JIS_2004');
--
-- return to the super user
--