1--TEST--
2Bug #20934 (htmlspecialchars returns latin1 from UTF-8)
3--SKIPIF--
4<?php
5if (!function_exists("utf8_encode") || !function_exists("utf8_decode")) {
6	die("SKIP Neither utf8_encode() nor utf8_decode() are available");
7}
8?>
9--FILE--
10<?php
11$str = utf8_encode("\xe0\xe1");
12var_dump(utf8_decode($str));
13var_dump(utf8_decode(htmlspecialchars($str, ENT_COMPAT, "UTF-8")));
14?>
15--EXPECT--
16string(2) "��"
17string(2) "��"
18