php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #47140 Add UTF-8 to convert_cyr_string()
Submitted: 2009-01-17 20:44 UTC Modified: 2018-05-05 12:26 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: boen dot robot at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: Strings related
PHP Version: 5.2.8 OS: Windows Vista Ultimate x64
Private report: No CVE-ID: None
 [2009-01-17 20:44 UTC] boen dot robot at gmail dot com
Description:
------------
Many comments in the convert_cyr_string() function provide some ways of converting cyrilic charsets to UTF-8. It would be great to have those compiled in, and ideally, also have the other convertion - from UTF-8 into the cyrillic charsets. With the iconv library and those comments in place, how difficult would it be to do that?

(BTW, when I've used iconv to do UTF-8 to Windows-1251 , I sometimes get an unsupported character error and I'm not sure why even though the text never had any exotic characters... but that's another thing that may be my fault, so I don't consider it a bug just yet)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-05 12:26 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: Strings related -Assigned To: +Assigned To: cmb
 [2018-05-05 12:26 UTC] cmb@php.net
Adding UTF-8 support to convert_cyr_string() does not make much
sense to me.  Instead I'd rather deprecate the highly specialized
function, in favor of using iconv() or mb_convert_encoding() in
the first place.

If you feel differently, please start the RFC process, see
<https://wiki.php.net/rfc/howto>.
 [2018-05-05 13:08 UTC] spam2 at rhsoft dot net
> Instead I'd rather deprecate the highly specialized
> function, in favor of using iconv() or mb_convert_encoding()

please don't throw the wod "deprecate" that lightly

just because functions are specialized or someone pretends options are dangerous if you use them in the wrong context don't make it a good idea to break existing code 

$allowable_tags of strip_tags() which is proposed to get deprectaed with 7.3 for no sane reason because nobody is forced to use it and you can shoot yourself in the foot in million ways - why don't deprecate "unlink" because someone could write unlink($_REQUEST['file_to_delete'])
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC