Search code examples
utf-8cakephp-2.1slug

Cakephp 2.0 inflector slug text encoding utf 8 return unexpected string


I have a problem with the Inflector::slug(); function on my live server. Local everything works fine.

I use the following code:

Inflector::slug($data['menu_items']['page_url'], '_');

A URL like 'this is an url' outputs 't_u_l'.

It has probably something tod o with text-encoding, but I changed everything to UTF-8.

Anybody had this problem?


Solution

  • Php have to be compiled with "--enable-unicode-properties" instead of utf-8

    or/and

    Sounds like your PCRE libraries are broken (this happens when the pcre libraries don't properly handle unicode patterns)