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

Can't load glTF URIs with unicode characters #973

Open
lilleyse opened this issue Oct 31, 2024 · 1 comment
Open

Can't load glTF URIs with unicode characters #973

lilleyse opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working quality Improve code quality or encourage developer success

Comments

@lilleyse
Copy link
Contributor

According to the glTF URIs section:

Paths with non-ASCII characters MAY be written as-is, with JSON string escaping, or with percent-encoding; all these options are valid. For example, the following three paths point to the same resource:

{
   "images": [
       {
          "uri": "grande_sphère.png"
       },
       {
           "uri": "grande_sph\u00E8re.png"
       },
       {
           "uri": "grande_sph%C3%A8re.png"
       }
   ]
}

But when I try to use GltfReader to load a glTF with a URI to 🐶.bin I get a runtime error:

std::runtime_error caught: GET `🐶.bin` failed: Couldn't resolve host name

🐶.gltf.zip

This may be a limitation in uriparser which only parses RFC 3986 URIs which are ASCII-based. It does not handle RFC 3987 IRIs which allow Unicode characters verbatim.

@kring
Copy link
Member

kring commented Nov 4, 2024

Your explanation makes sense to me @lilleyse. I wonder if there's a better library for our purposes than uriparser. I couldn't find one when I originally selected it for cesium-native, but that was over four years ago now.

@j9liu j9liu added bug Something isn't working quality Improve code quality or encourage developer success labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quality Improve code quality or encourage developer success
Projects
None yet
Development

No branches or pull requests

3 participants