Skip to content

IRI support (i.e. Unicode in URIs) #59

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

Closed
awwright opened this issue Sep 18, 2016 · 14 comments
Closed

IRI support (i.e. Unicode in URIs) #59

awwright opened this issue Sep 18, 2016 · 14 comments

Comments

@awwright
Copy link
Member

Most modern Web/hypermedia formats support IRIs instead of just URIs that are 7bit ASCII. IRIs are a superset of URIs that support full Unicode. For standards that only support URIs, IRIs have to be converted/escaped into a URI-compatible format.

@handrews
Copy link
Contributor

+1 for IRI support. It's 2016, let's be inclusive :-)

@awwright awwright added this to the draft-6 milestone Oct 8, 2016
@awwright awwright modified the milestones: draft-future, draft-next Nov 30, 2016
@handrews
Copy link
Contributor

@awwright what would need to be done for this? Is it sufficient to just go through and change URI to IRI? (and IRI reference, etc. etc.). I have not paid much attention to what sort of things come up with IRIs rather than URIs.

@handrews
Copy link
Contributor

Note that while there is no separate IRI Template specification, per RFC 6570:

Although the URI syntax is used for the result, the template string
is allowed to contain the broader set of characters that can be found
in Internationalized Resource Identifier (IRI) references [RFC3987].
Therefore, a URI Template is also an IRI template, and the result of
template processing can be transformed to an IRI by following the
process defined in Section 3.2 of [RFC3987].

@handrews handrews added the core label Sep 28, 2017
@handrews
Copy link
Contributor

@awwright @Relequestual @philsturgeon @gregsdennis any thoughts on this?

Is it just as simple as saying $id and $ref take IRI-references instead of URI-references? Is that desirable? It doesn't ever seem to come up, but IRIs will only get more important, I suspect.

@gregsdennis
Copy link
Member

Looks like IRIs are already supported in .Net which means I'm already supporting it 🎉

I have no problems with this.

@Relequestual
Copy link
Member

Seems like the right move to me.
Some extra considerations from RFD: https://www.w3.org/TR/rdf11-concepts/#h3_section-IRIs

Should we note similar considerations or is it unnecessary?

@jakubklimek
Copy link
Contributor

jakubklimek commented Jan 25, 2021

I already use IRIs in $ref and $id as this is necessary for Czech schemas. The ids and refs would look terrible otherwise:
https://ofn.gov.cz/turistické-cíle/2020-07-01/schémata/turistický-cíl.json
vs.
https://ofn.gov.cz/turistick%C3%A9-c%C3%ADle/2020-07-01/sch%C3%A9mata/turistick%C3%BD-c%C3%ADl.json

I use https://www.jsonschemavalidator.net/ for validation, and it worked OK with JSON instance files.
Only recently I accidentally validated the JSON schema itself and discovered that it is actually invalid because it uses IRIs in $id and $ref, which lead me to this issue.

Since there do not seem any objections to this, can this be implemented?

@Relequestual
Copy link
Member

Updating the meta-schema is not all the work that needs to be done.
The specification documents would need to be updated to use IRI for $id and potentially other places.
The meta-schema is informative only, while the specification documents are normative.

@jakubklimek
Copy link
Contributor

@Relequestual I see. Is this something I can help with, perhaps in another PR?

@Relequestual
Copy link
Member

Yes! You may use the same PR or another PR, your choice.
Often we don't update the meta-schema till later in the release cycle, but it's great to update it alongside changes.

My comment on your PR relating to not merging the PR... we haven't yet published the 2020-12 meta-schema. That is mostly my fault. Working on it =]

@philsturgeon
Copy link
Collaborator

Seems like a simple and important improvement! 🥳

@jakubklimek
Copy link
Contributor

@philsturgeon Well, it is simply done in the meta-schema. In the spec we need to take care not to break anything, especially regarding canonical URIs, URIs used in HTTP Link Headers, URI templates, etc.

But it needs to be done.

@jakubklimek
Copy link
Contributor

This may be closed now since it is implemented in #1137 .

@jdesrosiers
Copy link
Member

🎉 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants