Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-byte substr #63

Closed
likerRr opened this issue Oct 26, 2014 · 0 comments
Closed

Multi-byte substr #63

likerRr opened this issue Oct 26, 2014 · 0 comments

Comments

@likerRr
Copy link

likerRr commented Oct 26, 2014

Hi, great package, thx for a work.
I found an issue in format() method with 'M' format character (for short month name) for russian locale. You should consider, that russian characters are 2-bytes per symbol, so expression $translated = substr($translated, 0, 3); is incorrect. So preferred to use $translated = mb_substr($translated, 0, 3);

Maybe, it's also preferred to change any string methods to mb_ equivalent for correctly work with multibyte strings. Referenced to http://php.net/manual/en/ref.mbstring.php

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants