1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/standard/tests/strings/utf8.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

14 lines
387 B
PHP

--TEST--
UTF-8<->ISO Latin 1 encoding/decoding test
--FILE--
<?php
printf("%s -> %s\n", urlencode("æ"), urlencode(utf8_encode("æ")));
printf("%s <- %s\n", urlencode(utf8_decode(urldecode("%C3%A6"))), "%C3%A6");
?>
--EXPECTF--
Deprecated: Function utf8_encode() is deprecated in %s on line %d
%E6 -> %C3%A6
Deprecated: Function utf8_decode() is deprecated in %s on line %d
%E6 <- %C3%A6