|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23470 Character Encodings
Submitted: 2003-05-03 15:27 UTC Modified: 2003-05-03 16:45 UTC
From: luca at accomazzi dot net Assigned:
Status: Not a bug Package: mbstring related
PHP Version: 4.3.1 OS: Darwin (Mac OS X)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: luca at accomazzi dot net
New email:
PHP Version: OS:


 [2003-05-03 15:27 UTC] luca at accomazzi dot net
Regarding page:

Inside paragraph:
Supported Character Encodings

It says:
>As of PHP 4.3.0, the following character encoding support will be added experimentaly
>Windows-1251 (CP1251)

Incidentally, note that "experimentally" is misspelled with a single L.

I'm working with 4.3 and the above text seems incorrect. If I try:
mb_convert_encoding("whatever", "Windows-1251", "UTF-8");
Or even:
mb_convert_encoding("whatever", "CP1251", "UTF-8");

I get:
Warning: mb_convert_encoding() [function.mb-convert-encoding]: Unknown encoding "Windows-1251"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-03 16:40 UTC]
It looks there but its behind an ifdef:

#if defined(HAVE_MBSTR_RU)
static const char *mbfl_encoding_cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL};

static const mbfl_encoding mbfl_encoding_cp1251 = {
        (const char *(*)[])&mbfl_encoding_cp1251_aliases,

is Windows-1251 really supposed to be in this HAVE_MBSTR_RU?

 [2003-05-03 16:45 UTC]
(As moriyoshi explain on phpdoc@:)
Therefore cp1251 encoding isn't available unless you have configured your 
build with --enable-mbstring=all or --enable-mbstring=ru.

not a bug -> bogus
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 17 12:02:41 2024 UTC