1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00
Files
archived-php-src/ext/standard/tests/strings/bug20934.phpt
Rowan Tommins d9f3ca705c Add deprecation notices to utf8_encode and utf8_decode
Implements initial stage of accepted RFC to remove them:
https://wiki.php.net/rfc/remove_utf8_decode_and_utf8_encode

Tests relating to SOAP and htmlspecialchars seem to have been
using this entirely unnecessarily, so have been fixed.

Closes GH-8726.
2022-06-12 13:37:23 +02:00

12 lines
231 B
PHP

--TEST--
Bug #20934 (htmlspecialchars returns latin1 from UTF-8)
--FILE--
<?php
$str = "\xc3\xa0\xc3\xa1";
echo bin2hex($str), "\n";
echo bin2hex(htmlspecialchars($str, ENT_COMPAT, "UTF-8")), "\n";
?>
--EXPECTF--
c3a0c3a1
c3a0c3a1