Skip to content

The library doesn't correctly count the characters #7

@zer0uno

Description

@zer0uno

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions