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

The string to be encoded contains characters outside of the Latin1 range. #16

Closed
gkkirilov opened this issue Jan 14, 2022 · 3 comments · Fixed by #20
Closed

The string to be encoded contains characters outside of the Latin1 range. #16

gkkirilov opened this issue Jan 14, 2022 · 3 comments · Fixed by #20
Labels
enhancement New feature or request

Comments

@gkkirilov
Copy link

As I am using some Cyrillic symbols I had to add this inside the btoa method this code
.replace(/[\u00A0-\u2666]/g, function(c) { return '&#' + c.charCodeAt(0) + ';'; })

@jekuer jekuer added the enhancement New feature or request label Jan 27, 2022
@jekuer
Copy link
Collaborator

jekuer commented Jan 27, 2022

@gkkirilov , does this cover all relevant cyrillic symbols? Do you want to push a Pull Request for that?

@gkkirilov
Copy link
Author

I think it does, but don't want to add more complexity to the library, maybe lets just leave it as a reference point if anyone needs it.

@jekuer jekuer linked a pull request Jan 28, 2022 that will close this issue
@jekuer
Copy link
Collaborator

jekuer commented Jan 28, 2022

I included your fix in the latest version. It is not ideal, but at least removes the console error. Left a comment in the code for future optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants