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

references to characters and character values #242

Closed
aphillips opened this issue Nov 22, 2022 · 3 comments
Closed

references to characters and character values #242

aphillips opened this issue Nov 22, 2022 · 3 comments
Assignees
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on.

Comments

@aphillips
Copy link

Keywords and text string
https://www.w3.org/TR/2022/WD-png-3-20221025/#11keywords

Keywords shall contain only printable Latin-1 [ISO_8859-1] characters and spaces; that is, only character codes 32-126 and 161-255 decimal are allowed. To reduce the chances for human misreading of a keyword, leading spaces, trailing spaces, and consecutive spaces are not permitted in keywords, nor is the non-breaking space (code 160) since it is visually indistinguishable from an ordinary space.

Hex is preferred to decimal values when referring to code point ranges and I18N prefers if references also use the Unicode name when referring to specific characters. The Latin-1 heritage of some parts of PNG should not prevent switching to this best practice.

For example, instead of the non-break space (code 160) it should say U+00A0 NON-BREAKING SPACE and the ranges "32-126" and "161-255" would be 0x20-7E and 0xA1-FF respectively. This is easier for folks familiar with Unicode ;-).

@aphillips aphillips added the i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. label Nov 22, 2022
@ProgramMax
Copy link
Collaborator

@svgeesus is there particular reason (historical, maybe?) that the PNG spec might prefer decimal values?
If not, would it be okay to just use hex everywhere? (Having both hex and decimal increases surface area for mistakes.)

Recently, we changed a bunch of chunk definitions to be decimal-only. For example, IHDR says "73 72 68 82".
But the PNG signature section has both.
Just under that is a description of the "Chunk type" where regular text (not highlighted) says "decimal values 65 to 90".

As you can see, the spec is a bit all over the place. It might be nice for us to standardize on hex.

@svgeesus svgeesus self-assigned this Nov 28, 2022
@svgeesus
Copy link
Contributor

Just historical. I will look at it and make a PR

@svgeesus
Copy link
Contributor

I tend to agree that chunk signatures should be in hex while they are all in decimal. But that is separate to resolving the Internationalization comment so I prefer to do a separate issue and PR for that part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on.
Projects
None yet
Development

No branches or pull requests

3 participants