货币代码符号概述?

发布于 2024-11-27 01:17:07 字数 1536 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蘸点软妹酱 2024-12-04 01:17:07

请访问此网站。选择“货币符号”以查看所有可用货币符号的列表。要以 HTML 形式显示其中的大部分内容,您必须使用 &#x.... 语法,因为它们没有特定的 HTML 实体代码。

Take a look at this site. Select "Currency Symbols" to see a list of all available currency symbols. To display the majority of them in HTML, you'll have to use the &#x.... syntax, as they don't have a specific HTML entity code.

总以为 2024-12-04 01:17:07

Unicode 有一个货币符号类别:“Sc”,然后处理代码点的 Unicode 字符数据库在那个类别中。

有一个货币符号块,但是各种货币符号(包括“$ ”和“£”,后者是英镑符号,在该块中有一个单独的里拉符号)在创建该块之前进行了编码。

(此外,如果货币符号最近被采用 - 就像新的 IRP 符号 - 它可能还没有在 Unicode 中。)

最后,常见字体中的字形包含是另一个问题......

Unicode has a category for currency symbols: "Sc", and then process the Unicode Character database for code points in that category.

There is a single block of currency symbols, but various currency symbols (including "$" and "£", latter is Pound sign, in the block there is a separate Lira sign) were encoded before this block was created.

(Also, if the currency's symbol is recently adopted – like that new IRP sign – it might not be in Unicode yet.)

Finally, glyph inclusion in common typefaces is another issue…

帅冕 2024-12-04 01:17:07

有关 Unicode 特别支持的列表,您可以查看代码图表。然而,这缺少所有没有特殊符号(以及 $、£ 以及其他一些符号)或多个字母(例如 ლ、лв、Sh.So. 等)的货币。所以我认为在这方面维基百科列表比 Unicode 标准更详尽。

至于HTML中的包含,大部分都是文本。只需直接包含它们(假设您使用 Unicode),您甚至可以从维基百科复制它。如果您的文档字符集不是 Unicode,请尽快更改。同时,您可以使用常用的 &#x; 转义机制。

但请注意,很少需要以本国缩写形式向读者传达世界上所有货币。此外,一些更晦涩的字体可能不在读者安装的字体中。请记住,全世界许多人仍在使用 Windows XP,其字体中的 Unicode 覆盖率非常糟糕(与更新的操作系统相比)。

我不知道你在那里构建什么,但使用货币的 ISO 代码以及适当的符号(即更常用的符号)对我来说听起来更合理。一般来说,您需要支持的地区会很高兴看到 ₪ 而不是 ILS,但不要期望平等地支持整个世界 - 这只是一场成本噩梦。你们也不提供世界上所有语言的翻译,是吗?

For a list of what Unicode specifically supports, you can take a look into the code chart. However, that is missing all currency without a special symbol (and $, £ and maybe a few others) or multiple letters (e.g. ლ, лв, Sh.So., etc.). So I guess the Wikipedia list is more exhaustive than the Unicode Standard in that regard.

As for inclusion in HTML, most of them are text. Simply include them directly (assuming that you use Unicode), you can even copy it from Wikipedia. If your document character set isn't Unicode, then change that, ASAP. In the meantime you can use the usual &#x<code point value>; escape mechanism.

Note however, that there is rarely a need of conveying all the world's currencies in their native abbreviated form to the reader. Also some more obscure ones may not be in the fonts the reader has installed. Bear in mind that many people worldwide are still on Windows XP which has horrible Unicode coverage in its fonts (compared to more recent operating systems).

I have no clue what you're building there, but using the ISO codes for the currency and additionally a symbol where appropriate (i.e. for more commonly-used ones) sounds more reasonable to me. Generally the locales you need to support will be happy to see ₪ instead of ILS, but don't expect to support the whole world equally – that's just a cost nightmare. You don't provide translations in every language of the world, either, do you?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文