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

Fix string length #557

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fix string length #557

wants to merge 6 commits into from

Conversation

visavi
Copy link

@visavi visavi commented Nov 11, 2016

In different encodings such as UTF-8, the validator incorrectly believed the string length

In different encodings such as UTF-8, the validator incorrectly believed the string length
@koenpunt
Copy link
Collaborator

Thanks for your contribution. Please add a test for the faulty behavior.

Pear log 1.12 is not working with php 7, and a newer version requires a stable pear_exception
@visavi
Copy link
Author

visavi commented Nov 13, 2016

screen
before and after

Pear log 1.12 is not working with php 7, and a newer version requires a stable pear_exception
@xak2000
Copy link

xak2000 commented Jul 27, 2017

This change assumes the encoding is always UTF-8. But it is not.
In my project, the DB connection's encoding is KOI8-R for example (I can't change it to UTF-8 for many reasons).
And it will fail to check string length after this change.

A agree that UTF-8 is more common these days, but I think this problem requires more work. At least configurable encoding that respects DB connection's encoding.

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

Successfully merging this pull request may close these issues.

3 participants