note 111011 added to migration54.incompatible
| From: | Chris | Date: | Sat, 05 Jan 2013 15:00:40 +0000 |
| Subject: | note 111011 added to migration54.incompatible | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192770@lists.php.net to get a copy of this message | ||
Missing some chars like german umlauts after use of htmlspecialchars? That's because the third
param encoding has changed it's default value in PHP 5.4 from ISO-8859-1 to UTF-8.
Possible solution #1:
Change your code from this ...
htmlspecialchars( 'äöü' );
... to this:
htmlspecialchars ( 'äöü' , ENT_COMPAT | ENT_HTML401 , 'ISO-8859-1' );
Possible solution #2:
Create a wrapper function and replace htmlspecialchars( to i.e. isohtmlspecialchars( with your
IDE/editor/shell...
Example of a wrapper function:
function isohtmlspecialchars( $str ){
return htmlspecialchars ( $str , ENT_COMPAT | ENT_HTML401 , 'ISO-8859-1' );
}
----
Server IP: 69.147.83.199
Probable Submitter: 212.68.67.242
----
Manual Page -- http://php.net/manual/en/migration54.incompatible.php
Edit -- https://master.php.net/note/edit/111011
Del: integrated -- https://master.php.net/note/delete/111011/integrated
Del: useless -- https://master.php.net/note/delete/111011/useless
Del: bad code -- https://master.php.net/note/delete/111011/bad+code
Del: spam -- https://master.php.net/note/delete/111011/spam
Del: non-english -- https://master.php.net/note/delete/111011/non-english
Del: in docs -- https://master.php.net/note/delete/111011/in+docs
Del: other reasons-- https://master.php.net/note/delete/111011
Reject -- https://master.php.net/note/reject/111011
Search -- https://master.php.net/manage/user-notes.php