Skip to content
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

fix: Don't encode @ in project name #228

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

dominik003
Copy link
Contributor

T4C uses an intersting encoding for project names described in more detail here. Since our projects shouldn't use any special characters anyways, we can avoid reproducing their encoding by simply adding characters to the safe list if encountering a project with such a character.

Resolves #142

T4C uses an intersting encoding for project names
described in more detail [here](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier).
Since our projects shouldn't use any special characters anyways, we can
avoid reproducing their encoding by simply adding characters to the
safe list if encountering a project with such a character.
@MoritzWeber0
Copy link
Member

MoritzWeber0 commented Jan 22, 2024

In the references article, it is stated:

While URIs are limited to a subset of the US-ASCII character set (characters outside that set must be mapped to octets according to some unspecified character encoding, then percent-encoded), IRIs may additionally contain most characters from the Universal Character Set (Unicode/ISO 10646)

Therefore, we can just take all ISO_10646 characters and pass them as safe chars.

Since our projects shouldn't use any special characters anyways, we can avoid reproducing their encoding by simply adding characters to the safe list if encountering a project with such a character.

They SHOULDN'T in theory, but they do in practise. Therefore, I would prefer a more stable solution.

@dominik003
Copy link
Contributor Author

In the references article, it is stated:

While URIs are limited to a subset of the US-ASCII character set (characters outside that set must be mapped to octets according to some unspecified character encoding, then percent-encoded), IRIs may additionally contain most characters from the Universal Character Set (Unicode/ISO 10646)

Therefore, we can just take all ISO_10646 characters and pass them as safe chars.

Since our projects shouldn't use any special characters anyways, we can avoid reproducing their encoding by simply adding characters to the safe list if encountering a project with such a character.

They SHOULDN'T in theory, but they do in practise. Therefore, I would prefer a more stable solution.

Seems like I put the wrong link in there (not the actual link to the eclipse page which is the following: URI (EMF Documentation)). There it is stated:

This implementation uses Java's Unicode char and String representations, and makes no attempt to encode characters 0xA0 and above. Characters in the range 0x80-0x9F are still escaped. In this respect, EMF's notion of a URI is actually more like an IRI (Internationalized Resource Identifier), for which an RFC is now in draft form.

So as far as I see there is not just a clear set of characters we can ignore when quoting or how would you do that?

Copy link
Member

@MoritzWeber0 MoritzWeber0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for now, however we should investigate it in more detail: #229

@MoritzWeber0 MoritzWeber0 merged commit cdf5ec7 into main Feb 16, 2024
18 checks passed
@MoritzWeber0 MoritzWeber0 deleted the fix-import-project-name-encoding branch February 16, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup image fails for projects with '@' in the project name
2 participants