>return strtr($string, "SOZsozY...
Just curious why the search starts with unaccented "SOZsozY"?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ear
Paul Roberts
[EMAIL PROTECTED]
- Original Message -
From: "Ian M. Evans" <[EMAIL PROTECTED]>
To: "Ernest E Vogelsinger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 18, 2003 6:41 PM
Subject: RE: [PHP] Converti
Ernest E. Vogelsinger suggested:
>$chars_in = array('Á',''á','É','é'); // you get it
>$chars_out = array('A','a','E','e'); // this too
>preg_replace($chars_in, $chars_out, $string_to_parse);
I initially got a 'no ending delimiter' error but after adding /'s to the
$chars_in it was just what the
At 19:11 18.01.2003, Ian M. Evans said:
[snip]
>Thanks for the response. I guess I wasn't too clear in my original post. I'm
>not looking to turn an accented letter into its numeric equivalent, I'm
>looking to strip the accent so that Renée Zellweger becomes
At 17:25 18.01.2003, -<[ Rene Brehmer ]>- said:
[snip]
>Not sure about quick, but the only way I've found that works with 100%
>guarantee everytime is to take the string and check it character by
>character, and if the ascii value is > 128, simply replace it
Rene:
Thanks for the response. I guess I wasn't too clear in my original post. I'm
not looking to turn an accented letter into its numeric equivalent, I'm
looking to strip the accent so that Renée Zellweger becomes Renee Zellweger.
Any thoughts there?
--
PHP General Mailing List (http://www.ph
-<[ Rene Brehmer ]>- wrote:
something like this (untested):
for ($i = 0; $i < strlen($string_to_parse); $i++) {
$char = substr($string_to_parse, $i, 1);
if (ord($char) > 128) {
$output_string .= "".ord($char).";";
}
else {
$output_string .= $char;
}
}
You may need to test for value
Hi Ian M. Evans,
On Fri, 17 Jan 2003 14:04:15 -0500, you wrote about "[PHP] Converting
accented characters or numeric equivalents to non-accented" something that
looked like this:
>Does anyone have a quick PHP function for converting accented characters to
>their non-accented
Does anyone have a quick PHP function for converting accented characters to
their non-accented forms? It would really help a lot with Amazon searches,
etc.
For example something that can turn:
Renée Zellweger into Renee Zellweger
Along that same vein, turning
Renée Zellweger into Renee Zellwege
9 matches
Mail list logo