Created
July 8, 2014 02:11
-
-
Save ivanhoe011/91f2078e9d24701849cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (preg_match('!!u', $string)) | |
{ | |
// this is utf-8 | |
} | |
else | |
{ | |
// definitely not utf-8 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment