#38138 [Opn]: russian encoding detection support

From: Date: Wed, 19 Jul 2006 09:50:33 +0000
Subject: #38138 [Opn]: russian encoding detection support
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99594@lists.php.net to get a copy of this message
 ID:          38138
 Updated by:  tony2001@php.net
 Reported By: techtonik@php.net
 Status:      Open
-Bug Type:    mbstring related
+Bug Type:    Feature/Change Request
 PHP Version: 4.4.2
 New Comment:

Reclassified as feature request, where it belongs.

techtonik, I'm sure you know email addresses of ext/mbstring
maintainers and can contact them about it.
Although, I don't think this will ever appear in PHP6 (because mbstring
itself doesn't make much sense there) and it definitely won't appear in
PHP4 (it's time to upgrade, eh?).


Previous Comments:
------------------------------------------------------------------------

[2006-07-19 09:41:58] techtonik@php.net

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 this bug report at http://bugs.php.net/?id=38138&edit=1


Thread (13 messages)

« previous php.bugs (#99594) next »