note 109687 added to function.mb-detect-encoding
| From: | nmmm at nmmm dot nu | Date: | Thu, 09 Aug 2012 14:27:49 +0000 |
| Subject: | note 109687 added to function.mb-detect-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189975@lists.php.net to get a copy of this message | ||
If you are using cassandra or some other system that requires 100% correct UTF8 input, you can use
Gerg Tisza example for validating the UTF8 strings:
if (mb_detect_encoding($str, 'UTF-8', true) ){
// UTF8 is correct
// proceed
}else{
echo "UTF8 NOT VALIDATE: $str \n";
// do something in case of error.
}
----
Server IP: 69.147.83.197
Probable Submitter: 77.70.52.153
----
Manual Page -- http://www.php.net/manual/en/function.mb-detect-encoding.php
Edit -- https://master.php.net/note/edit/109687
Del: integrated -- https://master.php.net/note/delete/109687/integrated
Del: useless -- https://master.php.net/note/delete/109687/useless
Del: bad code -- https://master.php.net/note/delete/109687/bad+code
Del: spam -- https://master.php.net/note/delete/109687/spam
Del: non-english -- https://master.php.net/note/delete/109687/non-english
Del: in docs -- https://master.php.net/note/delete/109687/in+docs
Del: other reasons-- https://master.php.net/note/delete/109687
Reject -- https://master.php.net/note/reject/109687
Search -- https://master.php.net/manage/user-notes.php