Editorial: make ISO-2022-JP encoder perform error state switch#236
Merged
Editorial: make ISO-2022-JP encoder perform error state switch#236
Conversation
This way you can invoke its handler directly without going the process algorithm as is needed to fix #235. This also avoids the need for "prepend" in the "process" algorithm. Additionally, this commit adds two clarifying asserts to the "process" algorithm documenting what error modes can be in effect when.
hsivonen
suggested changes
Oct 20, 2020
| <p>If <var>pointer</var> is null, then: | ||
|
|
||
| <ol> | ||
| <li><p>If <a>ISO-2022-JP encoder state</a> is <a lt="ISO-2022-JP encoder jis0208">jis0208</a>, |
Member
There was a problem hiding this comment.
Shouldn't this be
Suggested change
| <li><p>If <a>ISO-2022-JP encoder state</a> is <a lt="ISO-2022-JP encoder jis0208">jis0208</a>, | |
| <li><p>If <a>ISO-2022-JP encoder state</a> is not <a lt="ISO-2022-JP encoder ASCII">ASCII</a>, |
Member
Author
There was a problem hiding this comment.
We don't do a state switch earlier when it's an error and Roman and I don't see why we should here. I should probably write some tests to ensure implementations do the right thing though. (Edit: whatever these tests end up showing though I don't want to make changes in this PR as this should just be editorial and making this suggested change would be a normative change.)
Member
There was a problem hiding this comment.
Please document (for non-browser users of the spec) that callers of the abstraction are responsible for emitting a replacement byte sequence that only uses the bytes that have the ASCII interpretation in the Roman state of ISO-2022-JP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This way you can invoke its handler directly without going the process algorithm as is needed to fix #235. This also avoids the need for "prepend" in the "process" algorithm.
Additionally, this commit adds two clarifying asserts to the "process" algorithm documenting what error modes can be in effect when.
Preview | Diff