Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diacritics panic #23

Closed
zaaarf opened this issue May 22, 2024 · 1 comment · Fixed by #24
Closed

Diacritics panic #23

zaaarf opened this issue May 22, 2024 · 1 comment · Fixed by #24

Comments

@zaaarf
Copy link
Contributor

zaaarf commented May 22, 2024

On version 6.0.0, I have encountered a panic at line 238, column 26, with error: byte index 2 is not a char boundary; it is inside 'ã' (bytes 1..3) of 'São Tomé e Príncipe'.

The problem appears to be the diacritic. I think it doesn't support Unicode characters at all.

I'll see if i can get a PR for fixing this done soon.

edit: the underlying find library provides you with the char index, not a byte index. The problem is that you treat that as a byte index.

@zaaarf
Copy link
Contributor Author

zaaarf commented May 22, 2024

Opened a PR. You can probably make my implementation a bit more elegant, but it works.

@JakeHandsome JakeHandsome linked a pull request Jun 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant