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.
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
Bi-Directional Transcoding of Invalid Identifiers #3
base: main
Are you sure you want to change the base?
Bi-Directional Transcoding of Invalid Identifiers #3
Changes from all commits
f04497c
bbd7826
f337909
57c7e94
376b8e8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At one point we had discussed that the right behavior is to attempt to decode and then reencode. Motivation-- Let's say I have
"tn__MünchenGermany_rEi5
, an identifier previously encoded withSdfBoostringEncodeIdentifier
, and I want to ensure it's ASCII encode withSdfBoostringEncodeAsciiIdentiifer
. It also can function as a validator. RunSdfBootrstringEncodeIdentifier
as a way of ensuring that an identifier is properly encoded.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or actually vice versa-- I'm leaving a domain that required Ascii identifiers and now I want to "upgrade" to Utf8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the input for encode should by any UTF-8 string and we do not really have any interpretation of what that string is. The output of encoding should be:
tn__
prefix): if the UTF-8 string is not in the domain of valid characters.I think the 3 proposed methods pose the minimum set of operations to fix the problem mentioned above:
That can be added into the set of methods to the API, and I think the intent is clear: it will attempt to check the passed identifier is a valid encoded identifier and it will encode it again.