From: [EMAIL PROTECTED] Operating system: PHP version: 4.4.2 PHP Bug Type: mbstring related Bug description: russian encoding detection support
Description: ------------ Detection of russian encoding in mb_detect_encoding is disabled although it present among the list of supported encodings. It just three rather simple encodings - windows-1251, cp866 and koi8-r that spoil everyday life routines of russian programmer and make PHP less attractive for millions of potential PHP developers. I'll be grateful if somebody will care about them by providing default option for hosting providers, who are not too enthusiastic to experiment with server-wide configuration. Reproduce code: --------------- <?php $str = "Íà÷àòà ðàáîòà íàä ðàçðàáîòêîé ñòðàíè÷êè ïðîåêòà. Êîä ñàéòà ñîäåðæèòñÿ â ìîäóëå farplugins íà CVS. Ñâåäåíèÿ îá îøèáêàõ è ïðåäëîæåíèÿ ìîæíî îñòàâëÿòü â òðýêåðàõ â êàòåãîðèè project website èëè â ñïèñêå ðàññûëêè farplugins-devel."; // $encoding = mb_detect_encoding($str, "UTF-8, Windows-1251, CP866, KOI8-R"); $encoding = mb_detect_encoding($str, array("UTF-8", "Windows-1251", "CP866", "KOI8-R")); var_dump($encoding); Expected result: ---------------- string(12) "Windows-1251" Actual result: -------------- bool(false) -- Edit bug report at http://bugs.php.net/?id=38138&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38138&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38138&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38138&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38138&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38138&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38138&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38138&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38138&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38138&r=support Expected behavior: http://bugs.php.net/fix.php?id=38138&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38138&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38138&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38138&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38138&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38138&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38138&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38138&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38138&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38138&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38138&r=mysqlcfg