Skip to content

Conversation

Evian-Zhang
Copy link

The former "–" is U+2013, En Dash, the latter is the normal hyphen can be directly typed from keyboard, which is U+002D.

The U+2013 dash makes the JSON output of OpenAPI page look strange:

image

The actual rendering output may differ based on locale.

@Turbo87
Copy link
Member

Turbo87 commented Oct 11, 2025

the JSON output of OpenAPI page

I'm not sure what you mean by "OpenAPI page" but this seems like a bug in that page, not in our description 🤔

@Evian-Zhang
Copy link
Author

It's https://crates.io/api/openapi.json. I found this link from the Data Access page of crates.io

@Turbo87
Copy link
Member

Turbo87 commented Oct 11, 2025

It's https://crates.io/api/openapi.json

ah, I see.

Bildschirmfoto 2025-10-11 um 12 01 57

seems to work fine here though. what browser are you using to access that file?

@Evian-Zhang
Copy link
Author

It's Safari 26.0.1 (21622.1.22.11.15) with default settings. I think this is related to encodings and locale. The default encoding setting of Safari in my region is GB2312 (a Chinese-specific encoding), if I changed it to Unicode (UTF - 8), then it renders fine.

@Turbo87
Copy link
Member

Turbo87 commented Oct 11, 2025

The default encoding setting of Safari in my region is GB2312 (a Chinese-specific encoding)

is that really the default in Safari? 😳

I would have expected that it defaulted to UTF-8 everywhere at this point 😅

anyways, JSON is UTF-8 by default, so this seems like a bug in Safari, if anything :)

@Evian-Zhang
Copy link
Author

😂 Only Apple can do.

Anyway, I will close the PR. Thank you!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants