1--TEST--
2htmlentities() test 15 (setlocale / KOI8-R)
3--INI--
4output_handler=
5default_charset=
6mbstring.internal_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--FILE--
15<?php
16setlocale(LC_CTYPE, "ru_RU.koi8r", "ru_RU.KOI8-R");
17$str = "���������";
18var_dump($str, htmlentities($str, ENT_QUOTES, ''));
19?>
20--EXPECT--
21string(9) "���������"
22string(63) "&#1088;&#1086;&#1089;&#1082;&#1086;&#1096;&#1085;&#1099;&#1081;"
23