-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
newcharmap
documentation
#558
Comments
The behavior is that all characters must translate to something. When would you need another behavior? |
I'd expect (and until I tested this, I thought this is how it worked) undefined characters to give an error, as a way of preventing non-existent characters (such as random Unicode lookalikes) from making it into games. |
Well then, I think documentation should state that whenever a character is not found in a charmap, it's simply copied as-is in the ROM. That way, the behavior of an empty charmap would make sense. |
Looking at lexer.c, it appears that:
|
Frankly, strings can use a different encoding than the rest of the document; I don't think we should try to handle those documents, as its out of spec anyway. |
Is there anything that cares about string encoding? Should there be? |
Whatever it is, the documentation to be accurate. Right now it says "By default, a character map contains ASCII encoding", which is incorrect. A default character map is empty, and string characters not in the charmap are inserted directly as their encoded bytes. That encoding is expected/allowed to be UTF-8, not ASCII (although of course ASCII is a subset of it).
That's what I was trying to hedge against in the wording, but the current behavior actually doesn't allow that. |
The documentation for
newcharmap
states that it creates a new, empty charmap. However, this charmap is most certainly not empty:Ideally, there should be a way to create an actually empty charmap, so that the above gives an error. But if this is not possible, at least the documentation should be updated.
The text was updated successfully, but these errors were encountered: