If HTML maxlength is 110, why can I input 114 characters?

html, localization, maxlength, php

Solution

Japanese text is most probably using a multibyte character encoding. Therefore you should make use of mb_strlen().

Best wishes, Fabian

Problem

``` <input type="text" id="title" name="title" size="50" maxlength="110" /> ``` You see, the maxlength is 110, but I was shocked when I found that I input 114 characters when I used ``` echo strlen($title); ``` Any idea? By the way, what I input was Japanese text. What's wrong?

Original source