--- /dev/null
+char# char alnum alpha cntrl digit lower graph print punct space upper xdigit lo up
+chr#0 +
+chr#1 +
+chr#2 +
+chr#3 +
+chr#4 +
+chr#5 +
+chr#6 +
+chr#7 +
+chr#8 +
+chr#9 + +
+chr#10 + +
+chr#11 + +
+chr#12 + +
+chr#13 + +
+chr#14 +
+chr#15 +
+chr#16 +
+chr#17 +
+chr#18 +
+chr#19 +
+chr#20 +
+chr#21 +
+chr#22 +
+chr#23 +
+chr#24 +
+chr#25 +
+chr#26 +
+chr#27 +
+chr#28 +
+chr#29 +
+chr#30 +
+chr#31 +
+chr#32 + +
+chr#33 ! + + + ! !
+chr#34 " + + + " "
+chr#35 # + + + # #
+chr#36 $ + + + $ $
+chr#37 % + + + % %
+chr#38 & + + + & &
+chr#39 ' + + + ' '
+chr#40 ( + + + ( (
+chr#41 ) + + + ) )
+chr#42 * + + + * *
+chr#43 + + + + + +
+chr#44 , + + + , ,
+chr#45 - + + + - -
+chr#46 . + + + . .
+chr#47 / + + + / /
+chr#48 0 + + + + + 0 0
+chr#49 1 + + + + + 1 1
+chr#50 2 + + + + + 2 2
+chr#51 3 + + + + + 3 3
+chr#52 4 + + + + + 4 4
+chr#53 5 + + + + + 5 5
+chr#54 6 + + + + + 6 6
+chr#55 7 + + + + + 7 7
+chr#56 8 + + + + + 8 8
+chr#57 9 + + + + + 9 9
+chr#58 : + + + : :
+chr#59 ; + + + ; ;
+chr#60 < + + + < <
+chr#61 = + + + = =
+chr#62 > + + + > >
+chr#63 ? + + + ? ?
+chr#64 @ + + + @ @
+chr#65 A + + + + + + a A
+chr#66 B + + + + + + b B
+chr#67 C + + + + + + c C
+chr#68 D + + + + + + d D
+chr#69 E + + + + + + e E
+chr#70 F + + + + + + f F
+chr#71 G + + + + + g G
+chr#72 H + + + + + h H
+chr#73 I + + + + + i I
+chr#74 J + + + + + j J
+chr#75 K + + + + + k K
+chr#76 L + + + + + l L
+chr#77 M + + + + + m M
+chr#78 N + + + + + n N
+chr#79 O + + + + + o O
+chr#80 P + + + + + p P
+chr#81 Q + + + + + q Q
+chr#82 R + + + + + r R
+chr#83 S + + + + + s S
+chr#84 T + + + + + t T
+chr#85 U + + + + + u U
+chr#86 V + + + + + v V
+chr#87 W + + + + + w W
+chr#88 X + + + + + x X
+chr#89 Y + + + + + y Y
+chr#90 Z + + + + + z Z
+chr#91 [ + + + [ [
+chr#92 \ + + + \ \
+chr#93 ] + + + ] ]
+chr#94 ^ + + + ^ ^
+chr#95 _ + + + _ _
+chr#96 ` + + + ` `
+chr#97 a + + + + + + a A
+chr#98 b + + + + + + b B
+chr#99 c + + + + + + c C
+chr#100 d + + + + + + d D
+chr#101 e + + + + + + e E
+chr#102 f + + + + + + f F
+chr#103 g + + + + + g G
+chr#104 h + + + + + h H
+chr#105 i + + + + + i I
+chr#106 j + + + + + j J
+chr#107 k + + + + + k K
+chr#108 l + + + + + l L
+chr#109 m + + + + + m M
+chr#110 n + + + + + n N
+chr#111 o + + + + + o O
+chr#112 p + + + + + p P
+chr#113 q + + + + + q Q
+chr#114 r + + + + + r R
+chr#115 s + + + + + s S
+chr#116 t + + + + + t T
+chr#117 u + + + + + u U
+chr#118 v + + + + + v V
+chr#119 w + + + + + w W
+chr#120 x + + + + + x X
+chr#121 y + + + + + y Y
+chr#122 z + + + + + z Z
+chr#123 { + + + { {
+chr#124 | + + + | |
+chr#125 } + + + } }
+chr#126 ~ + + + ~ ~
+chr#127 +
+chr#128 +
+chr#129 +
+chr#130 +
+chr#131 +
+chr#132 +
+chr#133 +
+chr#134 +
+chr#135 +
+chr#136 +
+chr#137 +
+chr#138 +
+chr#139 +
+chr#140 +
+chr#141 +
+chr#142 +
+chr#143 +
+chr#144 +
+chr#145 +
+chr#146 +
+chr#147 +
+chr#148 +
+chr#149 +
+chr#150 +
+chr#151 +
+chr#152 +
+chr#153 +
+chr#154 +
+chr#155 +
+chr#156 +
+chr#157 +
+chr#158 +
+chr#159 +
+chr#160 +
+chr#161 ¡ + + + ¡ ¡
+chr#162 ¢ + + + ¢ ¢
+chr#163 £ + + + £ £
+chr#164 ¤ + + + ¤ ¤
+chr#165 ¥ + + + ¥ ¥
+chr#166 ¦ + + + ¦ ¦
+chr#167 § + + + § §
+chr#168 ¨ + + + ¨ ¨
+chr#169 © + + + © ©
+chr#170 ª + + + ª ª
+chr#171 « + + + « «
+chr#172 ¬ + + + ¬ ¬
+chr#173 + + + +
+chr#174 ® + + + ® ®
+chr#175 ¯ + + + ¯ ¯
+chr#176 ° + + + ° °
+chr#177 ± + + + ± ±
+chr#178 ² + + + ² ²
+chr#179 ³ + + + ³ ³
+chr#180 ´ + + + ´ ´
+chr#181 µ + + + µ µ
+chr#182 ¶ + + + ¶ ¶
+chr#183 · + + + · ·
+chr#184 ¸ + + + ¸ ¸
+chr#185 ¹ + + + ¹ ¹
+chr#186 º + + + º º
+chr#187 » + + + » »
+chr#188 ¼ + + + ¼ ¼
+chr#189 ½ + + + ½ ½
+chr#190 ¾ + + + ¾ ¾
+chr#191 ¿ + + + ¿ ¿
+chr#192 À + + + + + à À
+chr#193 Á + + + + + á Á
+chr#194 Â + + + + + â Â
+chr#195 Ã + + + + + ã Ã
+chr#196 Ä + + + + + ä Ä
+chr#197 Å + + + + + å Å
+chr#198 Æ + + + + + æ Æ
+chr#199 Ç + + + + + ç Ç
+chr#200 È + + + + + è È
+chr#201 É + + + + + é É
+chr#202 Ê + + + + + ê Ê
+chr#203 Ë + + + + + ë Ë
+chr#204 Ì + + + + + ì Ì
+chr#205 Í + + + + + í Í
+chr#206 Î + + + + + î Î
+chr#207 Ï + + + + + ï Ï
+chr#208 Ð + + + + + ð Ð
+chr#209 Ñ + + + + + ñ Ñ
+chr#210 Ò + + + + + ò Ò
+chr#211 Ó + + + + + ó Ó
+chr#212 Ô + + + + + ô Ô
+chr#213 Õ + + + + + õ Õ
+chr#214 Ö + + + + + ö Ö
+chr#215 × + + + × ×
+chr#216 Ø + + + + + ø Ø
+chr#217 Ù + + + + + ù Ù
+chr#218 Ú + + + + + ú Ú
+chr#219 Û + + + + + û Û
+chr#220 Ü + + + + + ü Ü
+chr#221 Ý + + + + + ý Ý
+chr#222 Þ + + + + + þ Þ
+chr#223 ß + + + + + ß ß
+chr#224 à + + + + + à À
+chr#225 á + + + + + á Á
+chr#226 â + + + + + â Â
+chr#227 ã + + + + + ã Ã
+chr#228 ä + + + + + ä Ä
+chr#229 å + + + + + å Å
+chr#230 æ + + + + + æ Æ
+chr#231 ç + + + + + ç Ç
+chr#232 è + + + + + è È
+chr#233 é + + + + + é É
+chr#234 ê + + + + + ê Ê
+chr#235 ë + + + + + ë Ë
+chr#236 ì + + + + + ì Ì
+chr#237 í + + + + + í Í
+chr#238 î + + + + + î Î
+chr#239 ï + + + + + ï Ï
+chr#240 ð + + + + + ð Ð
+chr#241 ñ + + + + + ñ Ñ
+chr#242 ò + + + + + ò Ò
+chr#243 ó + + + + + ó Ó
+chr#244 ô + + + + + ô Ô
+chr#245 õ + + + + + õ Õ
+chr#246 ö + + + + + ö Ö
+chr#247 ÷ + + + ÷ ÷
+chr#248 ø + + + + + ø Ø
+chr#249 ù + + + + + ù Ù
+chr#250 ú + + + + + ú Ú
+chr#251 û + + + + + û Û
+chr#252 ü + + + + + ü Ü
+chr#253 ý + + + + + ý Ý
+chr#254 þ + + + + + þ Þ
+chr#255 + + + + +
--- /dev/null
+#! /bin/sh
+
+PATH=..:$PATH
+
+echo "Testing PostgreSQL compilation..."
+if ! test-pgsql-locale; then
+ exit 1
+fi
+
+LC_CTYPE=de_DE.ISO8859-1
+LC_COLLATE=$LC_CTYPE
+export LC_CTYPE LC_COLLATE
+
+echo "Testing LC_CTYPE..."
+if ! test-ctype > de-ctype.out; then
+ exit 1
+fi
+diff expected/de-ctype.out de-ctype.out
+
+echo "Testing LC_COLLATE..."
+perl ../sort-test.pl test-de-sort.in > test-de-sort.out
+diff expected/test-de-sort.out test-de-sort.out
+
+### If you have Python - uncomment the following two lines
+#python ../sort-test.py test-de-sort.in > test-de-sort.out
+#diff expected/test-de-sort.out test-de-sort.out
+
+abort() {
+ [ "$1" ] && echo "$*"
+ exit 1
+}
+
+for f in char varchar text; do
+ if echo $f | grep -q char; then
+ ftype="$f(30)"
+ else
+ ftype="$f"
+ fi
+ echo "Testing PgSQL: sort on $ftype type..."
+
+ dropdb testlocale >/dev/null 2>&1
+ createdb testlocale || abort "createdb failed"
+ psql -d testlocale -c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev/null 2>&1 || abort "createtable failed"
+ psql testlocale < test-de.sql.in > test-de-$f.sql.out 2>/dev/null || abort "test query failed"
+ diff expected/test-de-$f.sql.out test-de-$f.sql.out
+done
+
+for f in char varchar text; do
+ if echo $f | grep -q char; then
+ ftype="$f(30)"
+ else
+ ftype="$f"
+ fi
+ echo "Testing PgSQL: upper () on $ftype type..."
+
+ dropdb testlocale >/dev/null 2>&1
+ createdb testlocale || abort "createdb failed"
+ psql -d testlocale -c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev/null 2>&1 || abort "createtable failed"
+ psql testlocale < test-de-upper.sql.in > test-de-upper-$f.sql.out 2>/dev/null || abort "test query failed"
+ diff expected/test-de-upper-$f.sql.out test-de-upper-$f.sql.out
+done
+
+echo "Testing PgSQL: select on regexp..."
+psql testlocale < test-de-select.sql.in > test-de-select.sql.out 2>/dev/null || abort "select query failed"
+diff expected/test-de-select.sql.out test-de-select.sql.out
+dropdb testlocale || abort "dropdb failed"
+echo "Finished."