title: For what reason htmlspecialchar() default charset changed from ISO-8859-1 to UTF8
body: <p>According to <a href="http://php.net/htmlspecialchars" rel="nofollow">http://php.net/htmlspecialchars</a> the default value for the charset argument changed from ISO-8859-1 to UTF8 in PHP 5.4.</p>
  
  <p>If you follow the discussion of this bug <a href="https://bugs.php.net/bug.php?id=61354" rel="nofollow">https://bugs.php.net/bug.php?id=61354</a> here, you quickly realize that this lead to major difficulties in maintaining legacy PHP-Code. We've run into similar problems.</p>
  
  <p>Explanations like "most people use UTF-8" in this post <a href="http://nikic.github.io/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html" rel="nofollow">http://nikic.github.io/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html</a> are really weird.</p>
  
  <p>As far as I know, htmlspecialchars() quotes everything all right in UTF8, even if ISO-8859-1 is set. People using non-ASCII-charsets had to set the parameter... ok, but they are not affected by a change to the default behavior, either. I've written a lot of UTF-8 code and never had a problem with htmlspecialchars() using ISO-8859-1 before.</p>
  
  <p>So why change this behavior? Or am I overlooking some security issues? I just want to understand it (no code solution needed!).</p>