I've found that the library uses the strlen() function to determine the length of a string and this is not correct when using characters which representation requires more than 1 byte because what the strlen() really does is counting the bytes, not the characters. For example the Spanish character ¡ is counted as a string of 2 characters by the library.
To solve the issue, would it be better to use the mb_strlen() function?