--TEST--
Bug #37569 (WDDX incorrectly encodes high-ascii characters)
--SKIPIF--
--FILE--
= 0xc0) {
$v = chr(0xc3) . chr($i - 64);
} elseif ($i >= 0x80) {
$v = chr(0xc2) . chr($i);
} else {
$v = chr($i); // make it UTF-8
}
$ret = wddx_serialize_value($v);
echo $ret . "\n";
var_dump(bin2hex($v), bin2hex(wddx_deserialize($ret)), $v == wddx_deserialize($ret));
}
?>
--EXPECT--
A
string(2) "41"
string(2) "41"
bool(true)
B
string(2) "42"
string(2) "42"
bool(true)
C
string(2) "43"
string(2) "43"
bool(true)
D
string(2) "44"
string(2) "44"
bool(true)
E
string(2) "45"
string(2) "45"
bool(true)
F
string(2) "46"
string(2) "46"
bool(true)
G
string(2) "47"
string(2) "47"
bool(true)
H
string(2) "48"
string(2) "48"
bool(true)
I
string(2) "49"
string(2) "49"
bool(true)
J
string(2) "4a"
string(2) "4a"
bool(true)
K
string(2) "4b"
string(2) "4b"
bool(true)
L
string(2) "4c"
string(2) "4c"
bool(true)
M
string(2) "4d"
string(2) "4d"
bool(true)
N
string(2) "4e"
string(2) "4e"
bool(true)
O
string(2) "4f"
string(2) "4f"
bool(true)
P
string(2) "50"
string(2) "50"
bool(true)
Q
string(2) "51"
string(2) "51"
bool(true)
R
string(2) "52"
string(2) "52"
bool(true)
S
string(2) "53"
string(2) "53"
bool(true)
T
string(2) "54"
string(2) "54"
bool(true)
U
string(2) "55"
string(2) "55"
bool(true)
V
string(2) "56"
string(2) "56"
bool(true)
W
string(2) "57"
string(2) "57"
bool(true)
X
string(2) "58"
string(2) "58"
bool(true)
Y
string(2) "59"
string(2) "59"
bool(true)
Z
string(2) "5a"
string(2) "5a"
bool(true)
[
string(2) "5b"
string(2) "5b"
bool(true)
\
string(2) "5c"
string(2) "5c"
bool(true)
]
string(2) "5d"
string(2) "5d"
bool(true)
^
string(2) "5e"
string(2) "5e"
bool(true)
_
string(2) "5f"
string(2) "5f"
bool(true)
`
string(2) "60"
string(2) "60"
bool(true)
a
string(2) "61"
string(2) "61"
bool(true)
b
string(2) "62"
string(2) "62"
bool(true)
c
string(2) "63"
string(2) "63"
bool(true)
d
string(2) "64"
string(2) "64"
bool(true)
e
string(2) "65"
string(2) "65"
bool(true)
f
string(2) "66"
string(2) "66"
bool(true)
g
string(2) "67"
string(2) "67"
bool(true)
h
string(2) "68"
string(2) "68"
bool(true)
i
string(2) "69"
string(2) "69"
bool(true)
j
string(2) "6a"
string(2) "6a"
bool(true)
k
string(2) "6b"
string(2) "6b"
bool(true)
l
string(2) "6c"
string(2) "6c"
bool(true)
m
string(2) "6d"
string(2) "6d"
bool(true)
n
string(2) "6e"
string(2) "6e"
bool(true)
o
string(2) "6f"
string(2) "6f"
bool(true)
p
string(2) "70"
string(2) "70"
bool(true)
q
string(2) "71"
string(2) "71"
bool(true)
r
string(2) "72"
string(2) "72"
bool(true)
s
string(2) "73"
string(2) "73"
bool(true)
t
string(2) "74"
string(2) "74"
bool(true)
u
string(2) "75"
string(2) "75"
bool(true)
v
string(2) "76"
string(2) "76"
bool(true)
w
string(2) "77"
string(2) "77"
bool(true)
x
string(2) "78"
string(2) "78"
bool(true)
y
string(2) "79"
string(2) "79"
bool(true)
z
string(2) "7a"
string(2) "7a"
bool(true)
{
string(2) "7b"
string(2) "7b"
bool(true)
|
string(2) "7c"
string(2) "7c"
bool(true)
}
string(2) "7d"
string(2) "7d"
bool(true)
~
string(2) "7e"
string(2) "7e"
bool(true)
string(2) "7f"
string(2) "7f"
bool(true)
string(4) "c280"
string(4) "c280"
bool(true)
string(4) "c281"
string(4) "c281"
bool(true)
string(4) "c282"
string(4) "c282"
bool(true)
string(4) "c283"
string(4) "c283"
bool(true)
string(4) "c284"
string(4) "c284"
bool(true)
string(4) "c285"
string(4) "c285"
bool(true)
string(4) "c286"
string(4) "c286"
bool(true)
string(4) "c287"
string(4) "c287"
bool(true)
string(4) "c288"
string(4) "c288"
bool(true)
string(4) "c289"
string(4) "c289"
bool(true)
string(4) "c28a"
string(4) "c28a"
bool(true)
string(4) "c28b"
string(4) "c28b"
bool(true)
string(4) "c28c"
string(4) "c28c"
bool(true)
string(4) "c28d"
string(4) "c28d"
bool(true)
string(4) "c28e"
string(4) "c28e"
bool(true)
string(4) "c28f"
string(4) "c28f"
bool(true)
string(4) "c290"
string(4) "c290"
bool(true)
string(4) "c291"
string(4) "c291"
bool(true)
string(4) "c292"
string(4) "c292"
bool(true)
string(4) "c293"
string(4) "c293"
bool(true)
string(4) "c294"
string(4) "c294"
bool(true)
string(4) "c295"
string(4) "c295"
bool(true)
string(4) "c296"
string(4) "c296"
bool(true)
string(4) "c297"
string(4) "c297"
bool(true)
string(4) "c298"
string(4) "c298"
bool(true)
string(4) "c299"
string(4) "c299"
bool(true)
string(4) "c29a"
string(4) "c29a"
bool(true)
string(4) "c29b"
string(4) "c29b"
bool(true)
string(4) "c29c"
string(4) "c29c"
bool(true)
string(4) "c29d"
string(4) "c29d"
bool(true)
string(4) "c29e"
string(4) "c29e"
bool(true)
string(4) "c29f"
string(4) "c29f"
bool(true)
string(4) "c2a0"
string(4) "c2a0"
bool(true)
¡
string(4) "c2a1"
string(4) "c2a1"
bool(true)
¢
string(4) "c2a2"
string(4) "c2a2"
bool(true)
£
string(4) "c2a3"
string(4) "c2a3"
bool(true)
¤
string(4) "c2a4"
string(4) "c2a4"
bool(true)
¥
string(4) "c2a5"
string(4) "c2a5"
bool(true)
¦
string(4) "c2a6"
string(4) "c2a6"
bool(true)
§
string(4) "c2a7"
string(4) "c2a7"
bool(true)
¨
string(4) "c2a8"
string(4) "c2a8"
bool(true)
©
string(4) "c2a9"
string(4) "c2a9"
bool(true)
ª
string(4) "c2aa"
string(4) "c2aa"
bool(true)
«
string(4) "c2ab"
string(4) "c2ab"
bool(true)
¬
string(4) "c2ac"
string(4) "c2ac"
bool(true)
string(4) "c2ad"
string(4) "c2ad"
bool(true)
®
string(4) "c2ae"
string(4) "c2ae"
bool(true)
¯
string(4) "c2af"
string(4) "c2af"
bool(true)
°
string(4) "c2b0"
string(4) "c2b0"
bool(true)
±
string(4) "c2b1"
string(4) "c2b1"
bool(true)
²
string(4) "c2b2"
string(4) "c2b2"
bool(true)
³
string(4) "c2b3"
string(4) "c2b3"
bool(true)
´
string(4) "c2b4"
string(4) "c2b4"
bool(true)
µ
string(4) "c2b5"
string(4) "c2b5"
bool(true)
¶
string(4) "c2b6"
string(4) "c2b6"
bool(true)
·
string(4) "c2b7"
string(4) "c2b7"
bool(true)
¸
string(4) "c2b8"
string(4) "c2b8"
bool(true)
¹
string(4) "c2b9"
string(4) "c2b9"
bool(true)
º
string(4) "c2ba"
string(4) "c2ba"
bool(true)
»
string(4) "c2bb"
string(4) "c2bb"
bool(true)
¼
string(4) "c2bc"
string(4) "c2bc"
bool(true)
½
string(4) "c2bd"
string(4) "c2bd"
bool(true)
¾
string(4) "c2be"
string(4) "c2be"
bool(true)
¿
string(4) "c2bf"
string(4) "c2bf"
bool(true)
À
string(4) "c380"
string(4) "c380"
bool(true)
Á
string(4) "c381"
string(4) "c381"
bool(true)
Â
string(4) "c382"
string(4) "c382"
bool(true)
Ã
string(4) "c383"
string(4) "c383"
bool(true)
Ä
string(4) "c384"
string(4) "c384"
bool(true)
Å
string(4) "c385"
string(4) "c385"
bool(true)
Æ
string(4) "c386"
string(4) "c386"
bool(true)
Ç
string(4) "c387"
string(4) "c387"
bool(true)
È
string(4) "c388"
string(4) "c388"
bool(true)
É
string(4) "c389"
string(4) "c389"
bool(true)
Ê
string(4) "c38a"
string(4) "c38a"
bool(true)
Ë
string(4) "c38b"
string(4) "c38b"
bool(true)
Ì
string(4) "c38c"
string(4) "c38c"
bool(true)
Í
string(4) "c38d"
string(4) "c38d"
bool(true)
Î
string(4) "c38e"
string(4) "c38e"
bool(true)
Ï
string(4) "c38f"
string(4) "c38f"
bool(true)
Ð
string(4) "c390"
string(4) "c390"
bool(true)
Ñ
string(4) "c391"
string(4) "c391"
bool(true)
Ò
string(4) "c392"
string(4) "c392"
bool(true)
Ó
string(4) "c393"
string(4) "c393"
bool(true)
Ô
string(4) "c394"
string(4) "c394"
bool(true)
Õ
string(4) "c395"
string(4) "c395"
bool(true)
Ö
string(4) "c396"
string(4) "c396"
bool(true)
×
string(4) "c397"
string(4) "c397"
bool(true)
Ø
string(4) "c398"
string(4) "c398"
bool(true)
Ù
string(4) "c399"
string(4) "c399"
bool(true)
Ú
string(4) "c39a"
string(4) "c39a"
bool(true)
Û
string(4) "c39b"
string(4) "c39b"
bool(true)
Ü
string(4) "c39c"
string(4) "c39c"
bool(true)
Ý
string(4) "c39d"
string(4) "c39d"
bool(true)
Þ
string(4) "c39e"
string(4) "c39e"
bool(true)
ß
string(4) "c39f"
string(4) "c39f"
bool(true)
à
string(4) "c3a0"
string(4) "c3a0"
bool(true)
á
string(4) "c3a1"
string(4) "c3a1"
bool(true)
â
string(4) "c3a2"
string(4) "c3a2"
bool(true)
ã
string(4) "c3a3"
string(4) "c3a3"
bool(true)
ä
string(4) "c3a4"
string(4) "c3a4"
bool(true)
å
string(4) "c3a5"
string(4) "c3a5"
bool(true)
æ
string(4) "c3a6"
string(4) "c3a6"
bool(true)
ç
string(4) "c3a7"
string(4) "c3a7"
bool(true)
è
string(4) "c3a8"
string(4) "c3a8"
bool(true)
é
string(4) "c3a9"
string(4) "c3a9"
bool(true)
ê
string(4) "c3aa"
string(4) "c3aa"
bool(true)
ë
string(4) "c3ab"
string(4) "c3ab"
bool(true)
ì
string(4) "c3ac"
string(4) "c3ac"
bool(true)
í
string(4) "c3ad"
string(4) "c3ad"
bool(true)
î
string(4) "c3ae"
string(4) "c3ae"
bool(true)
ï
string(4) "c3af"
string(4) "c3af"
bool(true)
ð
string(4) "c3b0"
string(4) "c3b0"
bool(true)
ñ
string(4) "c3b1"
string(4) "c3b1"
bool(true)
ò
string(4) "c3b2"
string(4) "c3b2"
bool(true)
ó
string(4) "c3b3"
string(4) "c3b3"
bool(true)
ô
string(4) "c3b4"
string(4) "c3b4"
bool(true)
õ
string(4) "c3b5"
string(4) "c3b5"
bool(true)
ö
string(4) "c3b6"
string(4) "c3b6"
bool(true)
÷
string(4) "c3b7"
string(4) "c3b7"
bool(true)
ø
string(4) "c3b8"
string(4) "c3b8"
bool(true)
ù
string(4) "c3b9"
string(4) "c3b9"
bool(true)
ú
string(4) "c3ba"
string(4) "c3ba"
bool(true)
û
string(4) "c3bb"
string(4) "c3bb"
bool(true)
ü
string(4) "c3bc"
string(4) "c3bc"
bool(true)
ý
string(4) "c3bd"
string(4) "c3bd"
bool(true)
þ
string(4) "c3be"
string(4) "c3be"
bool(true)
ÿ
string(4) "c3bf"
string(4) "c3bf"
bool(true)