Bug #69114 [Com]: Undocumented 5.6 BC Break: default encoding ISO-8859-1 -> UTF-8

From: Date: Thu, 12 Mar 2015 12:27:58 +0000
Subject: Bug #69114 [Com]: Undocumented 5.6 BC Break: default encoding ISO-8859-1 -> UTF-8
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11995@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69114&edit=1 ID: 69114 Comment by: carlos dot buenosvinos at gmail dot com Reported by: maggus dot staab at googlemail dot com Summary: Undocumented 5.6 BC Break: default encoding ISO-8859-1 -> UTF-8 Status: Open Type: Bug Package: Documentation problem PHP Version: 5.6.6 Block user comment: N Private report: N New Comment: Same here. You also need to update your php.ini with mbstring.internal_encoding = "ISO-8859-1". Now everything is working. However, it looks like the fallback to default_charset is not working. Previous Comments: ------------------------------------------------------------------------ [2015-02-24 13:00:17] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69114&edit=1

« previous php.doc.bugs (#11995) next »