From: Skip Evans on
Hey all,

Does anyone have a function that replaces accented characters
with the non-accent equals?

I can't figure out how to get them out of the Ubuntu keyboard
the way it is configured so I've just tried three different
functions off the Internet and none of them have worked.

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: Ashley Sheridan on
On Thu, 2010-03-04 at 11:57 -0600, Skip Evans wrote:

> Hey all,
>
> Does anyone have a function that replaces accented characters
> with the non-accent equals?
>
> I can't figure out how to get them out of the Ubuntu keyboard
> the way it is configured so I've just tried three different
> functions off the Internet and none of them have worked.
>
> 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
>


Ubuntu should have gucharmap which should let you copy and paste
accented characters.

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


From: Daniel Brown on
On Thu, Mar 4, 2010 at 12:57, Skip Evans <skip(a)bigskypenguin.com> wrote:
> Hey all,
>
> Does anyone have a function that replaces accented characters
> with the non-accent equals?

This one by Sven on 21-APR-2005:

<?php
function transcribe($string) {
$string = strtr($string,
"\xA1\xAA\xBA\xBF\xC0\xC1\xC2\xC3\xC5\xC7
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
\xD2\xD3\xD4\xD5\xD8\xD9\xDA\xDB\xDD\xE0
\xE1\xE2\xE3\xE5\xE7\xE8\xE9\xEA\xEB\xEC
\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF8
\xF9\xFA\xFB\xFD\xFF",
"!ao?AAAAAC
EEEEIIIIDN
OOOOOUUUYa
aaaaceeeei
iiidnooooo
uuuyy");
$string = strtr($string, array("\xC4"=>"Ae", "\xC6"=>"AE",
"\xD6"=>"Oe", "\xDC"=>"Ue", "\xDE"=>"TH", "\xDF"=>"ss", "\xE4"=>"ae",
"\xE6"=>"ae", "\xF6"=>"oe", "\xFC"=>"ue", "\xFE"=>"th"));
return($string);
}
?>

If you search via Google for 'php accented characters function'
you'll see some user notes with code samples. I grabbed the one above
from strtr() on php.net, and there are several others there and other
places --- like on the preg_replace() page, if memory serves.


--
</Daniel P. Brown>
daniel.brown(a)parasane.net || danbrown(a)php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Looking for hosting or dedicated servers? Ask me how we can fit your budget!