Commit | Line | Data |
---|---|---|
530b72ba | 1 | #!./perl -w |
530b72ba NC |
2 | # |
3 | # Copyright 2002, Larry Wall. | |
4 | # | |
5 | # You may redistribute only under the same terms as Perl 5, as specified | |
6 | # in the README file that comes with the distribution. | |
7 | # | |
8 | ||
9 | # I ought to keep this test easily backwards compatible to 5.004, so no | |
10 | # qr//; | |
11 | ||
12 | # This test checks downgrade behaviour on pre-5.8 perls when new 5.8 features | |
13 | # are encountered. | |
14 | ||
15 | sub BEGIN { | |
48c887dd | 16 | unshift @INC, 't'; |
1afdebce | 17 | unshift @INC, 't/compat' if $] < 5.006002; |
530b72ba NC |
18 | require Config; import Config; |
19 | if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { | |
20 | print "1..0 # Skip: Storable was not built\n"; | |
21 | exit 0; | |
22 | } | |
530b72ba NC |
23 | } |
24 | ||
530b72ba NC |
25 | use Test::More; |
26 | use Storable 'thaw'; | |
27 | ||
28 | use strict; | |
1a58b39a | 29 | our (%U_HASH, $UTF8_CROAK, $RESTRICTED_CROAK); |
530b72ba | 30 | |
1a58b39a | 31 | our @RESTRICT_TESTS = ('Locked hash', 'Locked hash placeholder', |
530b72ba NC |
32 | 'Locked keys', 'Locked keys placeholder', |
33 | ); | |
1a58b39a | 34 | our %R_HASH = (perl => 'rules'); |
530b72ba | 35 | |
bfe34c33 | 36 | if ($] > 5.007002) { |
7e416500 JH |
37 | # This is cheating. "\xdf" in Latin 1 is beta S, so will match \w if it |
38 | # is stored in utf8, not bytes. | |
39 | # "\xdf" is y diaresis in EBCDIC (except for cp875, but so far no-one seems | |
40 | # to use that) which has exactly the same properties for \w | |
41 | # So the tests happen to pass. | |
530b72ba NC |
42 | my $utf8 = "Schlo\xdf" . chr 256; |
43 | chop $utf8; | |
44 | ||
7e416500 JH |
45 | # \xe5 is V in EBCDIC. That doesn't have the same properties w.r.t. \w as |
46 | # an a circumflex, so we need to be explicit. | |
47 | ||
48 | # and its these very properties we're trying to test - an edge case | |
49 | # involving whether scalars are being stored in bytes or in utf8. | |
50 | my $a_circumflex = (ord ('A') == 193 ? "\x47" : "\xe5"); | |
51 | %U_HASH = (map {$_, $_} 'castle', "ch${a_circumflex}teau", $utf8, chr 0x57CE); | |
530b72ba | 52 | plan tests => 169; |
530b72ba | 53 | } else { |
a86a81d3 | 54 | plan tests => 59; |
530b72ba NC |
55 | } |
56 | ||
a2307be4 NC |
57 | $UTF8_CROAK = "/^Cannot retrieve UTF8 data in non-UTF8 perl/"; |
58 | $RESTRICTED_CROAK = "/^Cannot retrieve restricted hash/"; | |
530b72ba NC |
59 | |
60 | my %tests; | |
61 | { | |
62 | local $/ = "\n\nend\n"; | |
63 | while (<DATA>) { | |
64 | next unless /\S/s; | |
65 | unless (/begin ([0-7]{3}) ([^\n]*)\n(.*)$/s) { | |
66 | s/\n.*//s; | |
67 | warn "Dodgy data in section starting '$_'"; | |
68 | next; | |
69 | } | |
70 | next unless oct $1 == ord 'A'; # Skip ASCII on EBCDIC, and vice versa | |
71 | my $data = unpack 'u', $3; | |
72 | $tests{$2} = $data; | |
73 | } | |
74 | } | |
75 | ||
76 | # use Data::Dumper; $Data::Dumper::Useqq = 1; print Dumper \%tests; | |
77 | sub thaw_hash { | |
78 | my ($name, $expected) = @_; | |
79 | my $hash = eval {thaw $tests{$name}}; | |
80 | is ($@, '', "Thawed $name without error?"); | |
81 | isa_ok ($hash, 'HASH'); | |
82 | ok (defined $hash && eq_hash($hash, $expected), | |
83 | "And it is the hash we expected?"); | |
84 | $hash; | |
85 | } | |
86 | ||
87 | sub thaw_scalar { | |
2aeb6432 | 88 | my ($name, $expected, $bug) = @_; |
530b72ba NC |
89 | my $scalar = eval {thaw $tests{$name}}; |
90 | is ($@, '', "Thawed $name without error?"); | |
91 | isa_ok ($scalar, 'SCALAR', "Thawed $name?"); | |
a86a81d3 | 92 | is ($$scalar, $expected, "And it is the data we expected?"); |
530b72ba NC |
93 | $scalar; |
94 | } | |
95 | ||
96 | sub thaw_fail { | |
97 | my ($name, $expected) = @_; | |
98 | my $thing = eval {thaw $tests{$name}}; | |
99 | is ($thing, undef, "Thawed $name failed as expected?"); | |
100 | like ($@, $expected, "Error as predicted?"); | |
101 | } | |
102 | ||
103 | sub test_locked_hash { | |
104 | my $hash = shift; | |
105 | my @keys = keys %$hash; | |
106 | my ($key, $value) = each %$hash; | |
107 | eval {$hash->{$key} = reverse $value}; | |
a2307be4 | 108 | like( $@, "/^Modification of a read-only value attempted/", |
530b72ba NC |
109 | 'trying to change a locked key' ); |
110 | is ($hash->{$key}, $value, "hash should not change?"); | |
111 | eval {$hash->{use} = 'perl'}; | |
a2307be4 | 112 | like( $@, "/^Attempt to access disallowed key 'use' in a restricted hash/", |
530b72ba NC |
113 | 'trying to add another key' ); |
114 | ok (eq_array([keys %$hash], \@keys), "Still the same keys?"); | |
115 | } | |
116 | ||
117 | sub test_restricted_hash { | |
118 | my $hash = shift; | |
119 | my @keys = keys %$hash; | |
120 | my ($key, $value) = each %$hash; | |
121 | eval {$hash->{$key} = reverse $value}; | |
122 | is( $@, '', | |
123 | 'trying to change a restricted key' ); | |
124 | is ($hash->{$key}, reverse ($value), "hash should change"); | |
125 | eval {$hash->{use} = 'perl'}; | |
a2307be4 | 126 | like( $@, "/^Attempt to access disallowed key 'use' in a restricted hash/", |
530b72ba NC |
127 | 'trying to add another key' ); |
128 | ok (eq_array([keys %$hash], \@keys), "Still the same keys?"); | |
129 | } | |
130 | ||
131 | sub test_placeholder { | |
132 | my $hash = shift; | |
133 | eval {$hash->{rules} = 42}; | |
134 | is ($@, '', 'No errors'); | |
135 | is ($hash->{rules}, 42, "New value added"); | |
136 | } | |
137 | ||
138 | sub test_newkey { | |
139 | my $hash = shift; | |
140 | eval {$hash->{nms} = "http://nms-cgi.sourceforge.net/"}; | |
141 | is ($@, '', 'No errors'); | |
142 | is ($hash->{nms}, "http://nms-cgi.sourceforge.net/", "New value added"); | |
143 | } | |
144 | ||
145 | # $Storable::DEBUGME = 1; | |
146 | thaw_hash ('Hash with utf8 flag but no utf8 keys', \%R_HASH); | |
147 | ||
148 | if (eval "use Hash::Util; 1") { | |
149 | print "# We have Hash::Util, so test that the restricted hashes in <DATA> are valid\n"; | |
150 | for $Storable::downgrade_restricted (0, 1, undef, "cheese") { | |
151 | my $hash = thaw_hash ('Locked hash', \%R_HASH); | |
152 | test_locked_hash ($hash); | |
153 | $hash = thaw_hash ('Locked hash placeholder', \%R_HASH); | |
154 | test_locked_hash ($hash); | |
155 | test_placeholder ($hash); | |
156 | ||
157 | $hash = thaw_hash ('Locked keys', \%R_HASH); | |
158 | test_restricted_hash ($hash); | |
159 | $hash = thaw_hash ('Locked keys placeholder', \%R_HASH); | |
160 | test_restricted_hash ($hash); | |
161 | test_placeholder ($hash); | |
162 | } | |
163 | } else { | |
164 | print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n"; | |
165 | my $hash = thaw_hash ('Locked hash', \%R_HASH); | |
166 | test_newkey ($hash); | |
167 | $hash = thaw_hash ('Locked hash placeholder', \%R_HASH); | |
168 | test_newkey ($hash); | |
169 | $hash = thaw_hash ('Locked keys', \%R_HASH); | |
170 | test_newkey ($hash); | |
171 | $hash = thaw_hash ('Locked keys placeholder', \%R_HASH); | |
172 | test_newkey ($hash); | |
173 | local $Storable::downgrade_restricted = 0; | |
174 | thaw_fail ('Locked hash', $RESTRICTED_CROAK); | |
175 | thaw_fail ('Locked hash placeholder', $RESTRICTED_CROAK); | |
176 | thaw_fail ('Locked keys', $RESTRICTED_CROAK); | |
177 | thaw_fail ('Locked keys placeholder', $RESTRICTED_CROAK); | |
178 | } | |
179 | ||
a86a81d3 NC |
180 | print "# We have utf8 scalars, so test that the utf8 scalars in <DATA> are valid\n"; |
181 | thaw_scalar ('Short 8 bit utf8 data', "\xDF", 1); | |
182 | thaw_scalar ('Long 8 bit utf8 data', "\xDF" x 256, 1); | |
183 | thaw_scalar ('Short 24 bit utf8 data', chr 0xC0FFEE); | |
184 | thaw_scalar ('Long 24 bit utf8 data', chr (0xC0FFEE) x 256); | |
530b72ba | 185 | |
bfe34c33 | 186 | if ($] > 5.007002) { |
530b72ba NC |
187 | print "# We have utf8 hashes, so test that the utf8 hashes in <DATA> are valid\n"; |
188 | my $hash = thaw_hash ('Hash with utf8 keys', \%U_HASH); | |
cf0d1c66 | 189 | my $a_circumflex = (ord ('A') == 193 ? "\x47" : "\xe5"); |
530b72ba NC |
190 | for (keys %$hash) { |
191 | my $l = 0 + /^\w+$/; | |
192 | my $r = 0 + $hash->{$_} =~ /^\w+$/; | |
193 | cmp_ok ($l, '==', $r, sprintf "key length %d", length $_); | |
cf0d1c66 | 194 | cmp_ok ($l, '==', $_ eq "ch${a_circumflex}teau" ? 0 : 1); |
530b72ba NC |
195 | } |
196 | if (eval "use Hash::Util; 1") { | |
197 | print "# We have Hash::Util, so test that the restricted utf8 hash is valid\n"; | |
198 | my $hash = thaw_hash ('Locked hash with utf8 keys', \%U_HASH); | |
199 | for (keys %$hash) { | |
200 | my $l = 0 + /^\w+$/; | |
201 | my $r = 0 + $hash->{$_} =~ /^\w+$/; | |
202 | cmp_ok ($l, '==', $r, sprintf "key length %d", length $_); | |
cf0d1c66 | 203 | cmp_ok ($l, '==', $_ eq "ch${a_circumflex}teau" ? 0 : 1); |
530b72ba NC |
204 | } |
205 | test_locked_hash ($hash); | |
206 | } else { | |
207 | print "# We don't have Hash::Util, so test that the utf8 hash downgrades\n"; | |
208 | fail ("You can't get here [perl version $]]. This is a bug in the test. | |
209 | # Please send the output of perl -V to perlbug\@perl.org"); | |
210 | } | |
211 | } else { | |
212 | print "# We don't have utf8 hashes, so test that the utf8 hashes downgrade\n"; | |
213 | thaw_fail ('Hash with utf8 keys', $UTF8_CROAK); | |
214 | thaw_fail ('Locked hash with utf8 keys', $UTF8_CROAK); | |
215 | local $Storable::drop_utf8 = 1; | |
a86a81d3 | 216 | my $expect = thaw $tests{"Hash with utf8 keys for 5.6"}; |
530b72ba NC |
217 | thaw_hash ('Hash with utf8 keys', $expect); |
218 | #foreach (keys %$expect) { print "'$_':\t'$expect->{$_}'\n"; } | |
219 | #foreach (keys %$got) { print "'$_':\t'$got->{$_}'\n"; } | |
220 | if (eval "use Hash::Util; 1") { | |
221 | print "# We have Hash::Util, so test that the restricted hashes in <DATA> are valid\n"; | |
222 | fail ("You can't get here [perl version $]]. This is a bug in the test. | |
223 | # Please send the output of perl -V to perlbug\@perl.org"); | |
224 | } else { | |
225 | print "# We don't have Hash::Util, so test that the restricted hashes downgrade\n"; | |
226 | my $hash = thaw_hash ('Locked hash with utf8 keys', $expect); | |
227 | test_newkey ($hash); | |
228 | local $Storable::downgrade_restricted = 0; | |
229 | thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK); | |
230 | # Which croak comes first is a bit of an implementation issue :-) | |
231 | local $Storable::drop_utf8 = 0; | |
232 | thaw_fail ('Locked hash with utf8 keys', $RESTRICTED_CROAK); | |
233 | } | |
234 | } | |
235 | __END__ | |
236 | # A whole run of 2.x nfreeze data, uuencoded. The "mode bits" are the octal | |
237 | # value of 'A', the "file name" is the test name. Use make_downgrade.pl to | |
238 | # generate these. | |
239 | begin 101 Locked hash | |
240 | 8!049`0````$*!7)U;&5S!`````1P97)L | |
241 | ||
242 | end | |
243 | ||
244 | begin 101 Locked hash placeholder | |
245 | C!049`0````(*!7)U;&5S!`````1P97)L#A0````%<G5L97,` | |
246 | ||
247 | end | |
248 | ||
249 | begin 101 Locked keys | |
250 | 8!049`0````$*!7)U;&5S``````1P97)L | |
251 | ||
252 | end | |
253 | ||
254 | begin 101 Locked keys placeholder | |
255 | C!049`0````(*!7)U;&5S``````1P97)L#A0````%<G5L97,` | |
256 | ||
257 | end | |
258 | ||
259 | begin 101 Short 8 bit utf8 data | |
260 | &!047`L.? | |
261 | ||
262 | end | |
263 | ||
264 | begin 101 Short 8 bit utf8 data as bytes | |
265 | &!04*`L.? | |
266 | ||
267 | end | |
268 | ||
269 | begin 101 Long 8 bit utf8 data | |
270 | M!048```"`,.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
271 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# | |
272 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
273 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# | |
274 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
275 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# | |
276 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
277 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# | |
278 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
279 | MPY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_# | |
280 | MG\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
281 | 8PY_#G\.?PY_#G\.?PY_#G\.?PY_#G\.? | |
282 | ||
283 | end | |
284 | ||
285 | begin 101 Short 24 bit utf8 data | |
286 | )!047!?BPC[^N | |
287 | ||
288 | end | |
289 | ||
290 | begin 101 Short 24 bit utf8 data as bytes | |
291 | )!04*!?BPC[^N | |
292 | ||
293 | end | |
294 | ||
295 | begin 101 Long 24 bit utf8 data | |
296 | M!048```%`/BPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
297 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
298 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
299 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
300 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
301 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
302 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
303 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
304 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
305 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
306 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
307 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
308 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
309 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
310 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
311 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
312 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
313 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
314 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
315 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
316 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
317 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
318 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
319 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
320 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
321 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
322 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
323 | MOZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N^+"/ | |
324 | ;OZ[XL(^_KOBPC[^N^+"/OZ[XL(^_KOBPC[^N | |
325 | ||
326 | end | |
327 | ||
328 | begin 101 Hash with utf8 flag but no utf8 keys | |
329 | 8!049``````$*!7)U;&5S``````1P97)L | |
330 | ||
331 | end | |
332 | ||
333 | begin 101 Hash with utf8 keys | |
334 | M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T | |
335 | D96%U%P/EGXX!`````^6?CA<'4V-H;&_#GP(````&4V-H;&_? | |
336 | ||
337 | end | |
338 | ||
339 | begin 101 Locked hash with utf8 keys | |
340 | M!049`0````0*!F-A<W1L900````&8V%S=&QE"@=C:.5T96%U!`````=C:.5T | |
341 | D96%U%P/EGXX%`````^6?CA<'4V-H;&_#GP8````&4V-H;&_? | |
342 | ||
343 | end | |
344 | ||
530b72ba NC |
345 | begin 101 Hash with utf8 keys for 5.6 |
346 | M!049``````0*!F-A<W1L90`````&8V%S=&QE"@=C:.5T96%U``````=C:.5T | |
347 | D96%U%P/EGXX``````^6?CA<'4V-H;&_#GP(````&4V-H;&_? | |
348 | ||
349 | end | |
350 | ||
62cc3256 JH |
351 | begin 301 Locked hash |
352 | 8!049`0````$*!9FDDX6B!`````27A9F3 | |
353 | ||
354 | end | |
355 | ||
356 | begin 301 Locked hash placeholder | |
cf0d1c66 | 357 | C!049`0````(.%`````69I).%H@H%F:23A:($````!)>%F9,` |
62cc3256 JH |
358 | |
359 | end | |
360 | ||
361 | begin 301 Locked keys | |
362 | 8!049`0````$*!9FDDX6B``````27A9F3 | |
363 | ||
364 | end | |
365 | ||
366 | begin 301 Locked keys placeholder | |
367 | C!049`0````(.%`````69I).%H@H%F:23A:(`````!)>%F9,` | |
368 | ||
369 | end | |
370 | ||
371 | begin 301 Short 8 bit utf8 data | |
372 | &!047`HMS | |
373 | ||
374 | end | |
375 | ||
376 | begin 301 Short 8 bit utf8 data as bytes | |
377 | &!04*`HMS | |
378 | ||
379 | end | |
380 | ||
381 | begin 301 Long 8 bit utf8 data | |
7e416500 | 382 | M!048```"`(MSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS |
62cc3256 JH |
383 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ |
384 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS | |
385 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ | |
386 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS | |
387 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ | |
388 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS | |
389 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ | |
390 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS | |
391 | MBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+ | |
392 | M<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS | |
393 | 8BW.+<XMSBW.+<XMSBW.+<XMSBW.+<XMS | |
394 | ||
395 | end | |
396 | ||
397 | begin 301 Short 24 bit utf8 data | |
398 | *!047!OM30G-S50`` | |
399 | ||
400 | end | |
401 | ||
402 | begin 301 Short 24 bit utf8 data as bytes | |
403 | *!04*!OM30G-S50`` | |
404 | ||
405 | end | |
406 | ||
407 | begin 301 Long 24 bit utf8 data | |
7e416500 | 408 | M!048```&`/M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 |
62cc3256 JH |
409 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S |
410 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
411 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
412 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
413 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
414 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
415 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
416 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
417 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
418 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
419 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
420 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
421 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
422 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
423 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
424 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
425 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
426 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
427 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
428 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
429 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
430 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
431 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
432 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
433 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
434 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
435 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
436 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
437 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
438 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
439 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
440 | M5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M3 | |
441 | M0G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S5?M30G-S | |
442 | -5?M30G-S5?M30G-S50`` | |
443 | ||
444 | end | |
445 | ||
446 | begin 301 Hash with utf8 flag but no utf8 keys | |
447 | 8!049``````$*!9FDDX6B``````27A9F3 | |
448 | ||
449 | end | |
450 | ||
451 | begin 301 Hash with utf8 keys | |
7e416500 JH |
452 | M!049``````0*!X.(1Z.%@:0`````!X.(1Z.%@:0*!H.!HJ.3A0`````&@X&B |
453 | FHY.%%P3<9')5`0````3<9')5%P?B@XB3EHMS`@````;B@XB3EM\` | |
62cc3256 JH |
454 | |
455 | end | |
456 | ||
457 | begin 301 Locked hash with utf8 keys | |
7e416500 JH |
458 | M!049`0````0*!X.(1Z.%@:0$````!X.(1Z.%@:0*!H.!HJ.3A00````&@X&B |
459 | FHY.%%P3<9')5!0````3<9')5%P?B@XB3EHMS!@````;B@XB3EM\` | |
62cc3256 JH |
460 | |
461 | end | |
462 | ||
62cc3256 | 463 | begin 301 Hash with utf8 keys for 5.6 |
7e416500 | 464 | M!049``````0*!H.!HJ.3A0`````&@X&BHY.%"@>#B$>CA8&D``````>#B$>C |
62cc3256 JH |
465 | FA8&D%P?B@XB3EHMS`@````;B@XB3EM\7!-QD<E4`````!-QD<E4` |
466 | ||
467 | end |