Skip to content

[Editorial] Truncation description inaccurate #1645

Open
@aphillips

Description

@aphillips

6.4.2. Language and Direction Encoding
https://www.w3.org/TR/webauthn-2/#sctn-strings-langdir

Consumers of strings that may have language and direction encoded should be aware that truncation could truncate a language tag into a different, but still valid, language. The final directionality marker or CANCEL TAG code point provide an unambigous indication of truncation.

Naive truncation of a language tag will not produce a valid language tag. Language tags will only remain valid if truncated just before a hyphen character (and noting that single-character or "singleton" subtags should not appear at the end of a language tag). It is also possible that a badly handled truncation scheme could change the meaning of a tag. For example:

tlh => tl (from Klingon to Tagalog)
hi-Deva = hi-De (from Hindi-written-in-Devanagari to Hindi-as-used-in-Germany)

A proper truncation here should describe using U+E002D (the equivalent of the hyphen character in language tags) to find subtags for removal.

Note that while the CANCEL TAG's absence probably doesn't introduce any rendering issues, note that the resulting strings concatenation with other strings could result in strange or unintended rendering.

The term "valid" may also be problematic here, since in BCP47 a language tag is valid if and only if each subtag has been checked for existence in the registry. The normal term of art here is "well-formed".

Metadata

Metadata

Assignees

Labels

@RiskItems that are at risk for L3i18n-needs-resolutionIssue the Internationalization Group has raised and looks for a response on.stat:pr-opentype:editorial

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions