Check if string is pure ASCII?
| From: | Jens Meyer | Date: | Mon, 20 Nov 2006 17:20:07 +0000 |
| Subject: | Check if string is pure ASCII? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-244888@lists.php.net to get a copy of this message | ||
Hello all!
To add special string-conversions for an imap-client only for strings
with special chars I am looking for a function which checks if a string
consists only standard ascii-chars.
I "see"/googled the following solutions:
- check for special chars (i.e. German umlauts) with preg_match()
With this solution all other international charsets are not recognized.
Not the best solution...
- check if string contains only letters and some chars with preg_match()
In this case I must add all standard ASCII-chars to regexp. Would be
possible.
- standard-function?
Is there any php-function for this available which I haven't found until
now?
Thank you for your hints and kind regards,
Jens