1--TEST-- 2htmlentities() test 16 (mbstring / cp1251) 3--INI-- 4output_handler= 5--SKIPIF-- 6<?php 7 extension_loaded("mbstring") or die("skip mbstring not available\n"); 8 if (!@mb_internal_encoding('cp1251') || 9 @htmlentities("\x88\xa9\xd2\xcf\xd3\xcb\xcf\xdb\xce\xd9\xca", ENT_QUOTES, '') == '') { 10 die("skip cp1251 character set is not available in this build.\n"); 11 } 12?> 13--FILE-- 14<?php 15mb_internal_encoding('cp1251'); 16$str = "\x88\xa9\xf0\xee\xf1\xea\xee\xf8\xed\xfb\xe9"; 17var_dump(bin2hex($str), htmlentities($str, ENT_QUOTES, '')); 18?> 19===DONE=== 20--EXPECT-- 21string(22) "88a9f0eef1eaeef8edfbe9" 22string(75) "€©роскошный" 23===DONE=== 24