Debian Codegraph @

contrib/hstore/expected/hstore_utf8.out

raw
1 /*
2 * This test must be run in a database with UTF-8 encoding,
3 * because other encodings don't support all the characters used.
4 */
5 SELECT getdatabaseencoding() <> 'UTF8'
6 AS skip_test \gset
7 \if :skip_test
8 \quit
9 \endif
10 SET client_encoding = utf8;
11 -- UTF-8 locale bug on macOS: isspace(0x85) returns true. \u0105 encodes
12 -- as 0xc4 0x85 in UTF-8; the 0x85 was interpreted here as a whitespace.
13 SELECT E'key\u0105=>value\u0105'::hstore;
14 hstore
15 ------------------
16 "keyą"=>"valueą"
17 (1 row)
18
19 SELECT 'keyą=>valueą'::hstore;
20 hstore
21 ------------------
22 "keyą"=>"valueą"
23 (1 row)
24
25 SELECT 'ą=>ą'::hstore;
26 hstore
27 ----------
28 "ą"=>"ą"
29 (1 row)
30
31 SELECT 'keyąfoo=>valueą'::hstore;
32 hstore
33 ---------------------
34 "keyąfoo"=>"valueą"
35 (1 row)
36
37 -- More patterns that may depend on isspace() and locales, all discarded.
38 SELECT E'key\u000A=>value\u000A'::hstore; -- \n
39 hstore
40 ----------------
41 "key"=>"value"
42 (1 row)
43
44 SELECT E'key\u0009=>value\u0009'::hstore; -- \t
45 hstore
46 ----------------
47 "key"=>"value"
48 (1 row)
49
50 SELECT E'key\u000D=>value\u000D'::hstore; -- \r
51 hstore
52 ----------------
53 "key"=>"value"
54 (1 row)
55
56 SELECT E'key\u000B=>value\u000B'::hstore; -- \v
57 hstore
58 ----------------
59 "key"=>"value"
60 (1 row)
61
62 SELECT E'key\u000C=>value\u000C'::hstore; -- \f
63 hstore
64 ----------------
65 "key"=>"value"
66 (1 row)
67