php.net |  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
 [2003-05-03 15:27 UTC] luca at accomazzi dot net
Regarding page:
http://www.php.net/manual/en/ref.mbstring.php

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"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-03 16:40 UTC] nicos@php.net
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 = {
        mbfl_no_encoding_cp1251,
        "Windows-1251",
        "Windows-1251",
        (const char *(*)[])&mbfl_encoding_cp1251_aliases,
        NULL,
        MBFL_ENCTYPE_SBCS
};

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

 [2003-05-03 16:45 UTC] derick@php.net
(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-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 27 18:01:23 2020 UTC