php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49733 mb_internal_encoding() value gets reset by parse_str()
Submitted: 2009-10-01 09:15 UTC Modified: 2009-12-13 18:12 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: dcz at phpbb-seo dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 5.3.0 OS: win xp
Private report: No CVE-ID: None
 [2009-10-01 09:15 UTC] dcz at phpbb-seo dot com
Description:
------------
I just ran into the same bug with php5.3 as described here : http://bugs.php.net/bug.php?id=48697 (php5.2.10)

parse_str still alter mb_internal_encoding


Reproduce code:
---------------
<?php
mb_internal_encoding('utf-8');
echo mb_internal_encoding()."<br/>";
parse_str('a=1&b=2');
echo mb_internal_encoding()."<br/>";
?>

Expected result:
----------------
UTF-8
UTF-8

Actual result:
--------------
UTF-8
ISO-8859-1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-01 09:19 UTC] dcz at phpbb-seo dot com
Forgot to mention : 
ini_set("mbstring.internal_encoding", 'UTF-8');
fixes the issue the same way it did for php5.2.10
 [2009-10-01 16:20 UTC] jani@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-10-01 17:24 UTC] dcz at phpbb-seo dot com
I just tried with another install of mine, and 5.2.6-2ubuntu4.3 works as expected.

Unfortunately, it won't be simple for me at this point to try other versions, the test is fairly simple though for anyone running the latest package.

Regards,

dcz
 [2009-10-10 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-10-22 15:32 UTC] php dot net at chris dot cs278 dot org
Fixed under 5.3-latest
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 04:01:38 2024 UTC