Improve test for CONVERT() with GB18030 <-> UTF8.

Add a bit of coverage of high code points.

Arjen Nienhuis
This commit is contained in:
Tom Lane 2015-05-15 17:03:18 -04:00
parent 26df7066cc
commit 199f5973c5
2 changed files with 10 additions and 10 deletions

View File

@ -523,17 +523,17 @@ SELECT CONVERT('foo', 'UTF8', 'EUC_TW');
(1 row)
-- GB18030 --> UTF8
SELECT CONVERT('foo', 'GB18030', 'UTF8');
convert
---------
foo
SELECT CONVERT('Postgres \247\343\247\335\247\340\247\337 \2249\3138 \317\363 \250\246le\2010\2747phant', 'GB18030', 'UTF8');
convert
-------------------------------------------------------------------------------------------------
Postgres \321\201\320\273\320\276\320\275 \360\237\220\230 \350\261\241 \303\251le\314\201phant
(1 row)
-- UTF8 --> GB18030
SELECT CONVERT('foo', 'UTF8', 'GB18030');
convert
---------
foo
SELECT CONVERT('Postgres \321\201\320\273\320\276\320\275 \360\237\220\230 \350\261\241 \303\251le\314\201phant', 'UTF-8', 'GB18030');
convert
-----------------------------------------------------------------------------------------
Postgres \247\343\247\335\247\340\247\337 \2249\3138 \317\363 \250\246le\2010\2747phant
(1 row)
-- GBK --> UTF8

View File

@ -171,9 +171,9 @@ SELECT CONVERT('foo', 'EUC_TW', 'UTF8');
-- UTF8 --> EUC_TW
SELECT CONVERT('foo', 'UTF8', 'EUC_TW');
-- GB18030 --> UTF8
SELECT CONVERT('foo', 'GB18030', 'UTF8');
SELECT CONVERT('Postgres \247\343\247\335\247\340\247\337 \2249\3138 \317\363 \250\246le\2010\2747phant', 'GB18030', 'UTF8');
-- UTF8 --> GB18030
SELECT CONVERT('foo', 'UTF8', 'GB18030');
SELECT CONVERT('Postgres \321\201\320\273\320\276\320\275 \360\237\220\230 \350\261\241 \303\251le\314\201phant', 'UTF-8', 'GB18030');
-- GBK --> UTF8
SELECT CONVERT('foo', 'GBK', 'UTF8');
-- UTF8 --> GBK