strtoupper and HTML entities
| From: | mweb | Date: | Sat, 22 Dec 2001 22:32:19 +0000 |
| Subject: | strtoupper and HTML entities | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78598@lists.php.net to get a copy of this message | ||
Hello,
I know I can convert a string to all uppercases with the strtoupper()
function. However, what if the original string contains HTML entities?
EXAMPLE:
original string = "funkstörung"
contains lowercase o with dieresis (ö)
properly displayed by browsers
after strtoupper becomes:
"FUNKSTÖRUNG" which is displayed by browsers
literally, because capital O with dieresis
is Ö
The uppercase version correctly displayable in a browser should be:
"FUNKSTÖRUNG
How can I convert to uppercase everything except these entities? Is there a
straightforward solution, or do I really put together a regex that puts in
lowercase everything from the second letter after an ampersand to the first
colon?
Thanks,
mweb