1--TEST-- 2Bug #75944 (wrong detection cp1251 encoding because of missing last cyrillic letter) 3--SKIPIF-- 4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> 5--FILE-- 6<?php 7var_dump(mb_detect_encoding(chr(0xfe), array('CP-1251'))); // letter '?' 8var_dump(mb_detect_encoding(chr(0xff), array('CP-1251'))); // letter '?' 9?> 10--EXPECT-- 11string(12) "Windows-1251" 12string(12) "Windows-1251" 13