Browse Source

Convert unaccent tests to UTF-8

This makes it easier to add new tests that are specific to Unicode
features.  The files were previously in KOI8-R.

Discussion: https://www.postgresql.org/message-id/8506.1545111362@sss.pgh.pa.us
tags/REL_12_BETA1
Peter Eisentraut 9 months ago
parent
commit
b6f3649bba
2 changed files with 20 additions and 20 deletions
  1. 13
    13
      contrib/unaccent/expected/unaccent.out
  2. 7
    7
      contrib/unaccent/sql/unaccent.sql

+ 13
- 13
contrib/unaccent/expected/unaccent.out View File

@@ -6,23 +6,23 @@ SELECT getdatabaseencoding();
UTF8
(1 row)

SET client_encoding TO 'KOI8';
SET client_encoding TO 'UTF8';
SELECT unaccent('foobar');
unaccent
----------
foobar
(1 row)

SELECT unaccent('L肆');
SELECT unaccent('褢谢泻邪');
unaccent
----------
盘肆
械谢泻邪
(1 row)

SELECT unaccent('出殡');
SELECT unaccent('衼袞袠袣');
unaccent
----------
弼殡
袝袞袠袣
(1 row)

SELECT unaccent('unaccent', 'foobar');
@@ -31,16 +31,16 @@ SELECT unaccent('unaccent', 'foobar');
foobar
(1 row)

SELECT unaccent('unaccent', 'L肆');
SELECT unaccent('unaccent', '褢谢泻邪');
unaccent
----------
盘肆
械谢泻邪
(1 row)

SELECT unaccent('unaccent', '出殡');
SELECT unaccent('unaccent', '衼袞袠袣');
unaccent
----------
弼殡
袝袞袠袣
(1 row)

SELECT ts_lexize('unaccent', 'foobar');
@@ -49,15 +49,15 @@ SELECT ts_lexize('unaccent', 'foobar');
(1 row)

SELECT ts_lexize('unaccent', 'L肆');
SELECT ts_lexize('unaccent', '褢谢泻邪');
ts_lexize
-----------
{盘肆}
{械谢泻邪}
(1 row)

SELECT ts_lexize('unaccent', '出殡');
SELECT ts_lexize('unaccent', '衼袞袠袣');
ts_lexize
-----------
{弼殡}
{袝袞袠袣}
(1 row)


+ 7
- 7
contrib/unaccent/sql/unaccent.sql View File

@@ -3,16 +3,16 @@ CREATE EXTENSION unaccent;
-- must have a UTF8 database
SELECT getdatabaseencoding();

SET client_encoding TO 'KOI8';
SET client_encoding TO 'UTF8';

SELECT unaccent('foobar');
SELECT unaccent('L肆');
SELECT unaccent('出殡');
SELECT unaccent('褢谢泻邪');
SELECT unaccent('衼袞袠袣');

SELECT unaccent('unaccent', 'foobar');
SELECT unaccent('unaccent', 'L肆');
SELECT unaccent('unaccent', '出殡');
SELECT unaccent('unaccent', '褢谢泻邪');
SELECT unaccent('unaccent', '衼袞袠袣');

SELECT ts_lexize('unaccent', 'foobar');
SELECT ts_lexize('unaccent', 'L肆');
SELECT ts_lexize('unaccent', '出殡');
SELECT ts_lexize('unaccent', '褢谢泻邪');
SELECT ts_lexize('unaccent', '衼袞袠袣');

Loading…
Cancel
Save