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

InvalidChar may be confusing in some instances #36

Closed
nicbus opened this issue Apr 18, 2024 · 0 comments
Closed

InvalidChar may be confusing in some instances #36

nicbus opened this issue Apr 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nicbus
Copy link

nicbus commented Apr 18, 2024

The InvalidRString::InvalidChar error contains the character that has been found to be invalid, but it may not match the character in the original string.

As an example, trying to issue an asset using a Unicode character in the ticker or name trigger this issue.

More specifically, issuing a NIA asset with name name with ℧nicode characters throws the error:

string 'name with ℧nicode characters' contains invalid character 'â'

This probably happens because the string is parsed 1 byte at a time and the 1st byte of the Unicode character happens to correspond to the â ASCII character, and this may lead do confusion.

Since the invalid character cannot be correctly interpreted in some cases, it may be better to omit it and just report the string that failed, or report the position of the invalid character in the string (which I think should always be correct) instead of its ASCII representation.

@dr-orlovsky dr-orlovsky self-assigned this Apr 18, 2024
@dr-orlovsky dr-orlovsky added enhancement New feature or request good first issue Good for newcomers labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants