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
Unicode library has trouble with "\0" #1545
Comments
To me, this looks fairly much as expected. The zero byte should not be present in text - it has no meaning, unlike a letter, or a space - and when you pass it to unicode libraries, you're saying it's text. More to the point I suspect the unicode library expects C-style zero terminators, which means that fixing this could involve replacing (with what?) or rewriting the unicode library. Lua strings are - have to be - type agnostic. Text or byte sequence, it has to handle them both. Therefore you keep the \0 for a long time in normal string functions. Technically, the specification could allow string.lower to return abc as well, but that could be surprising behavior when it didn't return string.len characters. |
https://en.m.wikipedia.org/wiki/Null_character |
It might be problem with how |
But lua.checkString might also make trouble since unicode.len returned incorrect values:
@fnuecke: Slightly offtopic, but why is it proxy.onBufferSet(x, row, truncated, vertical) and not proxy.onBufferSet(x, y, truncated, vertical) ? (
|
Assuming this happens in JNLua's As for the row vs. y thing... because it's a bug, probably! Will double check and fix. |
As of #1539 at least |
It looks like the library code only gets the part before the "\0".
The text was updated successfully, but these errors were encountered: