Skip to content

The library doesn't correctly count the characters #7

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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