Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed validator for utf8 string. strlen changed to mb_strlen. #633

wants to merge 1 commit into


None yet
2 participants

marcghorayeb commented Sep 5, 2012

Fixes a case where string lengths were not correclty calculated for utf8 strings.


nateabele commented Sep 5, 2012

We can't depend on the mb_string extension. Instead, I think the correct solution would be to use the Multibyte class.


marcghorayeb commented Sep 6, 2012

Okay i'll modify this when i have the time :)


nateabele commented Sep 15, 2012

Hey, I'm just gonna close this for now, since we're trying to clean up the issue tracker. Please open a new PR when you have a chance to implement one with the Multibyte class.

@nateabele nateabele closed this Sep 15, 2012


nateabele commented Sep 15, 2012

This was actually already patched in UnionOfRAD/lithium in a branch that was just merged to master, see here: https://github.com/UnionOfRAD/framework/blob/master/app/config/bootstrap/g11n.php#L178-182

I think this offers a good template for how to replace default Validator functions with multibyte-compatible functions.


marcghorayeb commented Sep 15, 2012

Indeed, this is cleaner :)
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment