-
Notifications
You must be signed in to change notification settings - Fork 135
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
Editorial: use unicode name/code for currencies in note #942
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @marcoscaceres,
It feels to me like we should review and harmonize the guidance in
this section. As written I think there are some contradictions between
the ISO4217 and non-ISO sections.
Here's an overall flow (with some questions inline). Let me know what you think.
INPUT:
-
An [[ISO4217]] well-formed 3-letter
alphabetic code (i.e., the numeric codes are not supported). -
Current implementations also allow the use of well-formed
currency codes that are not part of the official [[ISO4217]] list
(e.g., XBT, XRP, etc.). -
In more detail: User agents implementing this specification
enforce [[ISO4217]]'s 3-letter codes format via ECMAScript’s isWellFormedCurrencyCode
abstract operation, which is invoked as part of the check and
canonicalize amount algorithm. When a code does not adhere to
the [[ISO4217]] defined format, a {{RangeError}} is thrown.
DISPLAY:
-
Browsers that display the 3-letter currency codes generally do so
using uppercase. -
User agents MAY format the currency to adhere to OS
conventions (e.g., for localization purposes).OBSERVATION: This one overrides the points below so I am suggesting
to put it first. -
Currency symbols
-
Browsers MAY display a currency symbol instead of a currency code.
(e.g., "USD" is shown as U+0024 Dollar Sign ($), "GBP" is U+00A3
Pound Sign (£), and the non-standard "XBT" could be
shown as U+0243 Latin Capital Letter B with Stroke (Ƀ)) -
However, the meaning of currency symbols may be ambiguous, so
user agents SHOULD display currency codes.QUESTION: Should they only do that when there is ambiguity?
QUESTION: Should they not display the currency symbol at all,
or should they display the currency code along with the
symbol? -
The set of combinations of currency code for which localized
currency symbols are available is implementation dependent. -
When a currency symbol is not available, user agent MAY
MAY use U+00A4 (¤).
-
ADDITIONAL NOTES:
- Efforts are underway at ISO to account for digital currencies,
which may result in an update to the [[ISO4217]] registry or an
entirely new registry. The community expects this will resolve
ambiguities that have crept in through the use of non-standard
3-letter codes; for example, does "BTC" refer to Bitcoin or to a
future Bhutan currency? At the time of publication, it remains
unclear what form this evolution will take, or even the time frame
in which the work will be completed. The W3C Web Payments Working
Group is liaising with ISO so that, in the future, revisions to
this specification remain compatible with relevant ISO registries.
We probably don't want to recommend this at all.
No, they SHOULD always do it - otherwise it would get really confusing.
That's a call for UX team - and it may be locale dependent. Thus, it's not our (the WG's/Spec's) call. We can only point out what the pitfalls are (the note). The additional note seems good. I'll update. |
Never mind :) it's the same. |
This reverts commit 3215a30.
Note that we only say that the canonical form as it relates to the currency member. We don't say anything about how it should be shown: that's a UA/OS decision, not a spec decision. |
@ianbjacobs, rereading you comments, and questions aside, I think the updated prose addresses your comments... or at least, can you help me understand more specifically where it doesn't. I think there might be a misunderstanding in that there are no "ISO4217 and non-ISO sections." Let me clarify: any three letter combination is valid irrespective of ISO4217, as isWellFormedCurrencyCode doesn't care if a currency code is ISO4217 or not. Thus, saying |
Hi @marcoscaceres, At the 15 April 2021 WPWG call it was suggested to add an example of a 2-character currency symbol (just to make the point that not all currency symbols are single Unicode characters). One suggestion was to use PLN / zł. A concrete editorial proposal is to change (e.g., "USD" is shown as U+0024 Dollar Sign ($), "GBP" is U+00A3 Pound Sign (£), and the non-standard "XBT" could be shown as U+0243 Latin Capital Letter B with Stroke (Ƀ)). to (e.g., "USD" is shown as U+0024 Dollar Sign ($), "GBP" is shown as U+00A3 Pound Sign (£), "PLN" is shown as U+007A U+0142 Złoty (zł), and the non-standard "XBT" could be shown as U+0243 Latin Capital Letter B with Stroke (Ƀ)). cc @aphillips, @r12a |
Updated spec to include Złoty. |
Begins to address w3c/i18n-activity#1044
Preview | Diff