Inflector::slug() returns incorrect results in RHEL or CentOS systems
Reported by Rachman Chavik | August 11th, 2010 @ 02:28 AM | in 1.3.3
Calling Inflector::slug('1SourceSample.xls')
returned strange result: ou_mpl_l.
The correct result should have been:
1SourceSample_xls.
This behavior seem to be present only in cakephp 1.3.x on RHEL 5
and CentOS 5.4 systems.
CakePHP 1.2.5 does not have this problem.
To reproduce this issue, i used the following shell:
class BugShell extends Shell {
function main() {
$this->out('Inflected: ' . Inflector::slug('1SourceSample.xls'));
}
}
Comments and changes to this ticket
-

thatcode August 11th, 2010 @ 05:03 AM
http://api.cakephp.org/view_source/inflector/#line-618
This uses the -enable-unicode-properties flag, which is not enabled by default on CentOS's PHP install.
I've been trying to find somewhere where this is explicitly stated, but haven't done very well. This is definitely a known issue though, and has been marked as won't fix previously, as it's due to CentOS being behind.
Thatcode
-

Mark Story August 11th, 2010 @ 08:45 PM
- → Milestone set to 1.3.3
- → State changed from new to wont-fix
- → Tag set to inflector, slug
This ticket has been filed several times, and it still won't be fixed. Removing support for utf-8 is not really an option at this time. This is a known issue caused by broken PCRE libraries on CentOS
-

michaelc August 12th, 2010 @ 10:01 AM
I've had some luck with http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-p... . Certain validation rules fail with the mentioned warning, if you have the same problem.
-

Rachman Chavik August 13th, 2010 @ 06:56 AM
Hi,
Didn't realize that this was already reported before. Thanks for the pointers and comments, I will have a look aat those posts and update the PCRE packages.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Source available from github
Repository is at http://github.com/cakephp/cakephp
Creating a bug report
When creating a bug report, please include as much relevant information as possible. Please include code to reproduce the issue. Or even better, make a unit test. Either change an existing test or add a new test to show that the expected behavior is not occuring.
People watching this ticket
Referenced by
-
#1024 Inflector::underscore corrupts UTF8 strings
Duplicate of #1008, #635, #582. The root cause is broken ...