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

include standardized currencies in core intents #490

Open
polx opened this issue Apr 3, 2024 · 5 comments
Open

include standardized currencies in core intents #490

polx opened this issue Apr 3, 2024 · 5 comments

Comments

@polx
Copy link

polx commented Apr 3, 2024

We should include in core information about current currencies as defined by the ISO standardISO 4217.

This standard is, fortunately, available in full in multiple versions made through the maintainers of the standard (SIX). We should identify if:

  • each currency of the standard has a default pronounciation
  • each currency of the standard corresponds to unicode characters
  • each currency of the standard has a code-name that can be used, e.g., for core.
@dginev
Copy link
Contributor

dginev commented Apr 3, 2024

I suspect using the full (concept) name would be better than using the codes. For a random example, the armenian-dram would fit better as

<mo intent="armenian-dram">֏</mo>

compared to the code intent="AMD", which to me is less clear. I could understand AMD:ISO-4217, if the property was mandatory, but it feels neater to keep uniformity with intents being encyclopedic names.

A second observation for this example is that using the full name seems necessary when the base is ambiguous. The simple dram is also a unit of mass sometimes written , but also a currency for an entirely different country, with a rich history dating back to a few centuries BC.

@NSoiffer
Copy link
Contributor

NSoiffer commented Apr 4, 2024

It is strange that the Wikipedia page that @polx references has no mention of the Unicode block for the symbols used by many currencies. For the record, the Unicode currency symbols are listed on this Wikipedia page. The block (U+20A0 - 20C0) has 17 symbols, including one for Bitcoin. There are some other currency symbols. This include $, ¢, £, and, ¥.

MathCAT also includes "kr" (Danish Krone) which is used for its currency sign.

Maybe the best site for currency symbols is xe.com/symbols. It includes other "letter" currencies such as "лв" (which probably only @dginev recognizes) and "Z$" to distinguish Zimbabwe dollars from other other dollar currencies (in case the nine orders of magnitude difference wasn't clear enough :-)

A complication of currencies that units lack: the symbol often comes at the start of the amount, but is spoken at the end (e.g. $12.34). Also, fractional parts aren't usually spoken as decimal numbers (twelve dollars and 34 cents). Is anyone familiar with currency systems where they pronounced as decimal numbers?

The Euro sign can be before, in the middle, or at the end of the number. I don't know if other currencies are written in multiple ways. Does anyone know?

@NSoiffer
Copy link
Contributor

At the May 16 meeting, we discussed this again:

  • I pointed out the positional problem and felt that should be mentioned in whatever we do about currencies. More below
  • @polx still has questions out that he is waiting for replies on

Position of the currency symbol

I have not found a good resource that says where the currency symbol goes for every symbol. I did find the following:

  • From Investopedia: "In most non-English speaking European countries, the currency symbol follows the amount and is preceded by a space (as in "5 € ") whereas in English-speaking countries, the currency symbol comes before the amount and there is no space as in "$5")."
  • From Wikipedia in references to the dollar sign: "In the United States, Mexico, Australia, Argentina, Chile, Colombia, New Zealand, Hong Kong, Pacific Island nations, and English-speaking Canada, the sign is written before the number ("$5"), even though the word is written or spoken after it ("five dollars", "cinco pesos"). In French-speaking Canada, exceptionally, the dollar symbol usually appears after the number,[25] e.g., "5$"
  • From FastSpring: most listed currencies put the symbol in front. The following currencies place the symbol after the digits:
    • $ (French Canada)
    • Kč (Czech Republic)
    • Ft (Hungary)
    • , .د.م. (Morroco,
    • zł (Poland)
    • p. (Russia)
    • ﷼ (Saudi Arabia)
    • kr (Sweden)
    • ฿ (Thailand)
    • ₺ (Turkey)
    • ₫ (Vietnam)
  • If the ISO 4217 currency code (e.g., GBD, EUR, JPY) is used, there seems to be conflicting opinions. For example, see this discussion thread. which some say use "before" always and some say to use "before" only in English-speaking countries. From the part of the ISO doc that I can see (ISO docs are behind a paywall), the standard says nothing about placement of the name relative to the number.

At the meeting (and looking at references), I did confirm that the € symbol can occur before, in the middle (between euro and cents), and after.

@polx
Copy link
Author

polx commented Jun 5, 2024

I have not received an answer from SIX but maybe they just expect us to RTFM (that I would need to pay for).

I've been reviewing things again and it seems to me that we have three independant threads that we should all accept:

  • how to identify the currencies in an unambiguous way so that people can exchange; for the machine level, ISO4217 (se e.g. the wikipedia page or the public page at SIX) seems to be the accepted way and it relies on ASCII or numeric codes fo the currencies. Humans may identify from texts, calligraphy or voice but this requires interpretation. While this can be used in writing or speaking, this seems to be close to the purposes of MathML-content.
  • how to write the currencies. On this aspect it appears that the standards are only local (per currency) and I'd suggest to let authors employ MathML-presentation at its potential. It appears that multiple positioning strategies exist (e.g. for euros) and multiple symbols for the same currency exists (e.g. for rupees as seen in the currency symbol wikipedia page or the unicode list of currency symbols).
  • how to speak the currencies. On this aspect very little sounds to be written but, again, I suggest we let the authors be able to use her or his flexibility as provided by the intents grammar.

This flexibility sounds to be mentioned in the CLDR about currency symbols and sounds to match the relatively open page of currency symbols at XE.com.

@NSoiffer
Copy link
Contributor

From a discussion on the 16 June meeting, we are going to add the currency symbols (not "USD", etc). Speaking order could be left to an intent on a surrounding mrow. Since @polx wasn't at the meeting, this is still open for his feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants