Take a look at the various multibyte string manipulation functions
over at php.net. You may find what you're looking for there
On 8/3/06, anarchitect <[EMAIL PROTECTED]> wrote:
>
> Good afternoon everbody, i have some troubles turning special
> characters into "clean characters" to use for a slug (read: clean url
> string). I am running a str_replace() over the data that i receive from
> the model, yet it seams that special characters (such as ÃÄØ...) are
> encoded in something special, so that str_replace() won't work.
>
> $title = $entry['Post']['title'];
> $title = strtolower($title);
> $umlaute = array ("Ø", "Ã", "Ä", "ñ");
> $replace = array ("ue", "oe", "ae", "ss");
> $title = str_replace($umlaute, $replace, $title);
> $title = preg_replace("/\W/", "", $title);
> $entry['Post']['slug'] = $title;
>
> Any hints how i could turn de-code them from the model?
>
> Thanks for any help
>
>
> >
>
--
Chris Hartjes
"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---