Welcome Guest, Not a member yet? Register   Sign In
Wrong result of length validation when using russian and utf-8
#1

[eluser]Unknown[/eluser]
The case is simple:

When I input 10-letters word in the field and set max_length[20] for it, it validates. And when there's 11-letters word, validator raises an error "The title field can not exceed 20 characters in length.", that is certainly wrong.

I suppose, the reason is that utf-8 is two-byte encoding.
#2

[eluser]alpar[/eluser]
your right, the problem is from utf-8 and PHP not supporting it. Try finding a single byte encoding for your language. Or you could try using mb_string extension for php, but is slower, and you will have to make changes is many places in the framework.




Theme © iAndrew 2016 - Forum software by © MyBB