Skip to content

Commit 199f597

Browse files
committed
Improve test for CONVERT() with GB18030 <-> UTF8.
Add a bit of coverage of high code points. Arjen Nienhuis
1 parent 26df706 commit 199f597

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/test/regress/expected/conversion.out

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -523,17 +523,17 @@ SELECT CONVERT('foo', 'UTF8', 'EUC_TW');
523523
(1 row)
524524

525525
-- GB18030 --> UTF8
526-
SELECT CONVERT('foo', 'GB18030', 'UTF8');
527-
convert
528-
---------
529-
foo
526+
SELECT CONVERT('Postgres \247\343\247\335\247\340\247\337 \2249\3138 \317\363 \250\246le\2010\2747phant', 'GB18030', 'UTF8');
527+
convert
528+
-------------------------------------------------------------------------------------------------
529+
Postgres \321\201\320\273\320\276\320\275 \360\237\220\230 \350\261\241 \303\251le\314\201phant
530530
(1 row)
531531

532532
-- UTF8 --> GB18030
533-
SELECT CONVERT('foo', 'UTF8', 'GB18030');
534-
convert
535-
---------
536-
foo
533+
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');
534+
convert
535+
-----------------------------------------------------------------------------------------
536+
Postgres \247\343\247\335\247\340\247\337 \2249\3138 \317\363 \250\246le\2010\2747phant
537537
(1 row)
538538

539539
-- GBK --> UTF8

src/test/regress/sql/conversion.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ SELECT CONVERT('foo', 'EUC_TW', 'UTF8');
171171
-- UTF8 --> EUC_TW
172172
SELECT CONVERT('foo', 'UTF8', 'EUC_TW');
173173
-- GB18030 --> UTF8
174-
SELECT CONVERT('foo', 'GB18030', 'UTF8');
174+
SELECT CONVERT('Postgres \247\343\247\335\247\340\247\337 \2249\3138 \317\363 \250\246le\2010\2747phant', 'GB18030', 'UTF8');
175175
-- UTF8 --> GB18030
176-
SELECT CONVERT('foo', 'UTF8', 'GB18030');
176+
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');
177177
-- GBK --> UTF8
178178
SELECT CONVERT('foo', 'GBK', 'UTF8');
179179
-- UTF8 --> GBK

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy