diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2010-03-23 18:08:06 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2010-03-23 18:08:06 +0000 |
commit | 906dd4eac5d98daa172ddf40c04f684474a05338 (patch) | |
tree | c20cce1e1d33397d6b576ada265fcb2ce59f3759 /ext/standard/html.c | |
parent | b7f26585276b27ebaba4e006d141a8180c76f130 (diff) | |
download | php-git-906dd4eac5d98daa172ddf40c04f684474a05338.tar.gz |
Switch default_charset, if not specified, from ISO-8859-1 to UTF-8
I have been wanting to make this change for years, but there is a small
chance of BC issues, so it shouldn't go into a minor release.
Diffstat (limited to 'ext/standard/html.c')
-rw-r--r-- | ext/standard/html.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/html.c b/ext/standard/html.c index e5891588a7..d9ccff9dd0 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -711,17 +711,17 @@ inline static unsigned int get_next_char(enum entity_charset charset, /* {{{ entity_charset determine_charset * returns the charset identifier based on current locale or a hint. - * defaults to iso-8859-1 */ + * defaults to UTF-8 */ static enum entity_charset determine_charset(char *charset_hint TSRMLS_DC) { int i; - enum entity_charset charset = cs_8859_1; + enum entity_charset charset = cs_utf_8; int len = 0; zval *uf_result = NULL; - /* Guarantee default behaviour for backwards compatibility */ + /* Default is now UTF-8 */ if (charset_hint == NULL) - return cs_8859_1; + return cs_utf_8; if ((len = strlen(charset_hint)) != 0) { goto det_charset; @@ -855,7 +855,7 @@ det_charset: } } if (!found) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "charset `%s' not supported, assuming iso-8859-1", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "charset `%s' not supported, assuming utf-8", charset_hint); } } |