-
Notifications
You must be signed in to change notification settings - Fork 101
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
Improve int.toUnicode()
documentation
#80
Comments
int.toUnicode()
behavior for supplementary code pointsint.toUnicode()
documentation
Thanks for the insightful comments 👍 |
Yes, something like So you're right the documentation might be a bit misleading. String lengths are hard and they are not a very useful measure, but they are probably the best we got for describing what happens for code points like So I think I might go with your suggestion. I'll let you know. |
The documentation for the newly added
int.toUnicode()
predicate says:This is slightly misleading because CodeQL strings consist of UTF-16 code points. Therefore supplementary code points (> U+FFFF) will result in two CodeQL string characters (demonstrated by this query). It might also be good to describe its behavior for invalid code point values. For surrogate code point it does not seem to have a result either, e.g.
55296.toUnicode()
.Also it should uppercase "Unicode".
I would recommend the following description (or similar):
This requires changes to the built-in documentation (which is why I created the issue here) as well as the language specification.
The text was updated successfully, but these errors were encountered: