1--TEST-- 2htmlentities() test 15 (setlocale / KOI8-R) 3--INI-- 4output_handler= 5default_charset= 6internal_encoding=pass 7--SKIPIF-- 8<?php 9$result = (bool)setlocale(LC_CTYPE, "ru_RU.koi8r", "ru_RU.KOI8-R"); 10if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) { 11 die("skip setlocale() failed\n"); 12} 13?> 14--DESCRIPTION-- 15As of PHP 5.4, htmlentities() no longer makes replacements with numerical 16entities. Hence, for this input there's no substitution. 17--FILE-- 18<?php 19setlocale(LC_CTYPE, "ru_RU.koi8r", "ru_RU.KOI8-R"); 20$str = "���������"; 21var_dump($str, htmlentities($str, ENT_QUOTES, '')); 22?> 23--EXPECT-- 24string(9) "���������" 25string(9) "���������" 26