note 119888 added to function.iconv-set-encoding
| From: | CoralieB | Date: | Thu, 15 Sep 2016 09:10:15 +0000 |
| Subject: | note 119888 added to function.iconv-set-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206593@lists.php.net to get a copy of this message | ||
I encountered the same issue than joe dot bowman at edigitalresearch.com
Even if i read on the web that it is a usual issue when using PHP 5.6 and upper, i didn't
encounter it on every sites on which i use PHP 5.6.
Nevertheless, i had to find a solution because, when the issue appears, it's embarrassing. This
is what i found thanks to Alexandra López on http://hasibul.info.
Instead of :
if (function_exists(âiconvâ))
{
// These are settings that can be set inside code
iconv_set_encoding(âinternal_encodingâ, âUTF-8?);
iconv_set_encoding(âinput_encodingâ, âUTF-8?);
iconv_set_encoding(âoutput_encodingâ, âUTF-8?);
}
i use :
if (PHP_VERSION_ID < 50600) {
iconv_set_encoding('input_encoding', 'UTF-8');
iconv_set_encoding('output_encoding', 'UTF-8');
iconv_set_encoding('internal_encoding', 'UTF-8');
} else {
ini_set('default_charset', 'UTF-8');
}
----
Server IP: 72.52.91.14
Probable Submitter: 2a01:e35:2f61:62a0:e0f4:e24f:18d3:7a67
----
Manual Page -- http://php.net/manual/en/function.iconv-set-encoding.php
Edit -- https://master.php.net/note/edit/119888
Del: integrated -- https://master.php.net/note/delete/119888/integrated
Del: useless -- https://master.php.net/note/delete/119888/useless
Del: bad code -- https://master.php.net/note/delete/119888/bad+code
Del: spam -- https://master.php.net/note/delete/119888/spam
Del: non-english -- https://master.php.net/note/delete/119888/non-english
Del: in docs -- https://master.php.net/note/delete/119888/in+docs
Del: other reasons-- https://master.php.net/note/delete/119888
Reject -- https://master.php.net/note/reject/119888
Search -- https://master.php.net/manage/user-notes.php