diff options
author | andi <andi@splitbrain.org> | 2005-01-27 22:14:11 +0100 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-01-27 22:14:11 +0100 |
commit | 44f669e9d81543bb16f1017c005d7739766c6d7d (patch) | |
tree | 9a9fb1b067532dcfb1a96ea9ba6ed8c85d13cad7 /inc/utf8.php | |
parent | b6504bd7ff2bfd237edfbe2f1479a05698aa6624 (diff) | |
download | rpg-44f669e9d81543bb16f1017c005d7739766c6d7d.tar.gz rpg-44f669e9d81543bb16f1017c005d7739766c6d7d.tar.bz2 |
utf8 safe mailfunctions added (fixes #82)
darcs-hash:20050127211411-9977f-77f25921e855969dd8b7d4ded732bfdba5aec7ab.gz
Diffstat (limited to 'inc/utf8.php')
-rw-r--r-- | inc/utf8.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/inc/utf8.php b/inc/utf8.php index 1d2676688..bd52a7cf2 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -42,6 +42,18 @@ function utf8_decodeFN($file){ } /** + * Checks if a string contains 7bit ASCII only + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function utf8_isASCII($str){ + for($i=0; $i<strlen($str); $i++){ + if(ord($str{$i}) >127) return false; + } + return true; +} + +/** * Tries to detect if a string is in Unicode encoding * * @author <bmorel@ssi.fr> |