From: Skip Evans on
Hey all,

I'm looking for recommendations on how to replace accented
characters, like e and u with those two little dots above
them, with the regular e and u characters.

I'm finding some solutions via Google, but would like to hear
from some of you to hear how you handle those situations.

Thanks,
Skip

--
====================================
Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut
From: Skip Evans on
Looks like strtr() is the way to go?

Skip

Skip Evans wrote:
> Hey all,
>
> I'm looking for recommendations on how to replace accented characters,
> like e and u with those two little dots above them, with the regular e
> and u characters.
>
> I'm finding some solutions via Google, but would like to hear from some
> of you to hear how you handle those situations.
>
> Thanks,
> Skip
>

--
====================================
Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut
From: Ross McKay on
On Wed, 27 Jan 2010 16:55:46 -0600, Skip Evans wrote:

>I'm looking for recommendations on how to replace accented
>characters, like e and u with those two little dots above
>them, with the regular e and u characters.

$newText = iconv('UTF-8', 'ASCII//TRANSLIT', $text);

But ensure you have set your locale properly.

http://au.php.net/manual/en/function.iconv.php
--
Ross McKay, Toronto NSW Australia
"All we are saying
Is give peas a chance" - SeedSavers
From: Ashley Sheridan on
On Thu, 2010-01-28 at 10:25 +1100, Ross McKay wrote:

> On Wed, 27 Jan 2010 16:55:46 -0600, Skip Evans wrote:
>
> >I'm looking for recommendations on how to replace accented
> >characters, like e and u with those two little dots above
> >them, with the regular e and u characters.
>
> $newText = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
>
> But ensure you have set your locale properly.
>
> http://au.php.net/manual/en/function.iconv.php
> --
> Ross McKay, Toronto NSW Australia
> "All we are saying
> Is give peas a chance" - SeedSavers
>


Don't forget that changing some characters can actually change the words
and meanings of words. While an ë might look like and e, it's actually a
completely different character, with a different pronunciation to go
with it.

Is there some particular web service you're using that doesn't support
utf8 character sets?

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: Ross McKay on
On Wed, 27 Jan 2010 23:38:42 +0000, Ashley Sheridan wrote:

>Don't forget that changing some characters can actually change the words
>and meanings of words. While an � might look like and e, it's actually a
>completely different character, with a different pronunciation to go
>with it. [...]

True. But for the purposes of "cleaning up" URLs (not I18N friendly, but
practical on Anglo-centric websites) it has its uses.
--
Ross McKay, Toronto, NSW Australia
"Faced with a choice between the survival of the planet
and a new set of matching tableware, most people would
choose the tableware" - George Monbiot