Re: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread -[ Rene Brehmer ]-
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 forms? It would really

Re: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Chris Hewitt
-[ 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 127 ...

RE: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Ian M. Evans
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

Re: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Ernest E Vogelsinger
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 with

RE: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Ernest E Vogelsinger
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

RE: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Ian M. Evans
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

Re: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Paul Roberts
] - 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] Converting accented characters or numeric equivalents to non-accented Ernest E

RE: [PHP] Converting accented characters or numeric equivalents to non-accented

2003-01-18 Thread Ian M. Evans
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