mirror of
https://github.com/php/php-src.git
synced 2025-08-20 17:34:35 +02:00
- add simple unicode test
This commit is contained in:
parent
eac15d9fd5
commit
f00f7056a2
1 changed files with 20 additions and 0 deletions
20
tests/output/ob_016.phpt
Normal file
20
tests/output/ob_016.phpt
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--TEST--
|
||||||
|
output buffering - unicode/binary
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
declare(encoding="latin1");
|
||||||
|
ini_set("unicode.output_encoding", "utf8");
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
echo "-aäoöuüsß-";
|
||||||
|
$s = ob_get_clean();
|
||||||
|
|
||||||
|
var_dump($s);
|
||||||
|
var_dump(unicode_decode($s, unicode_semantics()?"utf8":"latin1"));
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
string(10) "%s"
|
||||||
|
unicode(10) "%s"
|
||||||
|
--UEXPECTF--
|
||||||
|
string(14) "%s"
|
||||||
|
unicode(10) "%s"
|
Loading…
Add table
Add a link
Reference in a new issue