|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-02-24 13:00 UTC] maggus dot staab at googlemail dot com
Description: ------------ With PHP5.6 the default encoding changed from ISO-8859-1 to UTF8. This bc break is not mentioned in the list of BC changes: http://php.net/manual/en/migration56.incompatible.php The charset related docs mention that iconv.input_encoding iconv.output_encoding iconv.internal_encoding mbstring.http_input mbstring.http_output mbstring.internal_encoding is deprecated as of 5.6 and we should use default_charset instead: http://php.net/manual/en/ini.core.php#ini.default-charset For non-utf8 legacy app which are updated to PHP5.6 it is not clearly documented how the path is. just setting ini_set('default_charset', 'ISO-8859-1'); does not do the trick, because of the deprecated above mentioned settings still default to UTF8. It feels like non-utf8 apps can only be configured using deprecated settings like (which does not work by the way) ini_set('default_charset', 'ISO-8859-1'); iconv_set_encoding("internal_encoding", 'ISO-8859-1'); iconv_set_encoding("output_encoding", 'ISO-8859-1'); iconv_set_encoding("input_encoding", 'ISO-8859-1'); How is the correct way to migrate a non-utf8 app to 5.6? How should the settings look like to be compatible to 5.5 defaults and also be future proof (so dont rely on deprecated settings)? Such a path should be documented in the migration guide. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
When these iconv.internal_encoding mbstring.internal_encoding are empty, default_charset should be used. There was a bug and it was fixed. If there is another bug, please paste simple reproducible script here. proxymus, what is user "default_charset"? If it sets to ISO-8859-1, then PHP should set charset to ISO-8859-1. I'm guessing that you have empty "default_charset". If this is the case, "default_charset=ISO-8859-1" should fix your problem.