Russian ruble symbol HTML code?

眉间皱痕 提交于 2019-12-17 18:13:21

问题


Since Russian central bank already approved the new symbol for Russian ruble, is there any HTML code for it? Or I need to use png images?


回答1:


Since 16 June 2014 there is a letter in unicode: \u20bd representing RUB currency sign:

So, the answer to the question: HTML entity which should be used for RUB sign is ₽

Though, I suppose currently not all fonts are capable of showing it. Ability to see the sign in browser generally depends on your system fonts. As of today my Mac OS web fonts are showing it correctly, but I didn't check it on Windows and Linux.

Therefore it is not recommended to use this new sign when it is critical for reader to see it relying only on system fonts, that might be stale. If you want to be confident that the sign will be displayed you will need to provide your own font at least for paragraphs that may contain RUB sign.

From Wikipedia:

On 4 February 2014, the Unicode Technical Committee during its 138th meeting in San Jose accepted U+20BD ₽ ruble sign symbol for the Unicode version 7.0, the symbol was then included into Unicode 7.0 released on 16 June 2014.

http://en.wikipedia.org/wiki/Russian_ruble#Currency_symbol




回答2:


Russia changed the Ruble symbol around 2013-12.

See the Wikipedia pages on Russian ruble and on Ruble sign for details.


Unicode 7: U+20BD

The Unicode consortium officially designated a code point, U+20BD RUBLE SIGN, numbered 8,381 (decimal) and U+20BD (Unicode hex), for the new symbol in Unicode 7.0, released 2014-06-16. See the last entry in this Unicode chart of Currency Symbols (PDF).

Do not confuse this new character with either the Armenian letter ք or the Latin letter .

By the way, Unicode 7 also gained the manat used in Azerbaijan, U+20BC MANAT SIGN, ₼. More importantly, Unicode also got the Spock hand sign, Vulcan Salute, U+1F596, 🖖.

Fonts

Older fonts will, of course, lack a glyph. You will need to obtain new or updated fonts.

Character Entity

I don't understand what a "HTML code" is in your question. If you meant a character entity reference, I do not know of any named reference. You can use ₽ in your HTML to reference by the decimal number of the Unicode code point.

Use an abbreviation: RUB

As an alternative to a symbol, you can always use the 3-letter abbreviation RUB. Standardized internationally in ISO 4217.


Use An Image

Yes, you could use an image.

If you must support older computers or older browsers not yet updated with support and glyphs for Unicode 7, then using an image or the RUB abbreviation are the only sure solutions.

Wikipedia image

That Wikipedia page provides an image drawn in SVG format under a Creative Commons license.

lenta.ru

Perhaps this large sans-serif rendering from lenta.ru might be legally available; I don't know as I don't read Russian.

http://icdn.lenta.ru/images/2013/12/11/12/20131211120143352/pic_a717232efc27b9b9fb68fea1c9cd3d72.jpg

Here is the official specification diagram of the symbol:




回答3:


Use ₽ html mnemonic

₽ 100



回答4:


I think as of now you have to use the images only for using the rouble symbol since it was decided only on December 11, 2013 so W3C will take some time to implement it.

The best I found in here like The rouble sign in HTML.

<style type="text/css">
    img.ruble-img { height: 1.5ex; }
    span.dot { position:absolute; text-indent: -1000em; }
</style>
<p style="font-size:1em">Bunnies 100 <img src="ruble.gif" class="ruble-img" /><span class="dot">RUR</span> each</p>
<p style="font-size:1.2em">Bunnies 100 <img src="ruble.gif" class="ruble-img" /><span class="dot">RUR</span> each</p>
<p style="font-size:1.5em">Bunnies 100 <img src="ruble.gif" class="ruble-img" /><span class="dot">RUR</span> each</p>
<p style="font-size:2em">Bunnies 100 <img src="ruble.gif" class="ruble-img" /><span class="dot">RUR</span> each</p>

EDIT:-

As per the latest update on 16 Dec 2013:

The next discussion of course will be where in Unicode this will appear. Some have proposed that it will be U+0554, but that is the Armenian letter keh (Ք). Although the appearance is similar, there is a discussion online already of whether this is the best idea to transmit Armenian /k/ as a currency symbol.

Based on previous patterns, I predict that a new code will be assigned, perhaps in the Currency block (U+20BB?) or possibly the Cyrillic block. If it's in the Cyrillic block, it would a new addition to the recent Indian Rupee Symbol (U+20B9/₹) and Turkish Lira sign (U+20BA/₺).




回答5:


Here's what Wikipedia tells us (http://en.wikipedia.org/wiki/Russian_ruble#Currency_symbol):

On December 11, 2013, the Central Bank of Russia approved the winner of the competition for the new ruble sign. The winning symbol, RUB, is now the official ruble sign.[17] As of 2013, it does not yet have a Unicode code point assigned, but work is proceeding to put it through the standardization process for code point assignment.

So the answer to your question is yes, currently you should use PNG.




回答6:


You can also use a hosted web font that has the symbol in place. This is relatively well supported, though I don't know if there are any fonts that have the symbol yet. According to wikipedia PT Sans is a potential candidate.




回答7:


You can read an extensive explanation here http://www.artlebedev.ru/tools/technogrette/html/rouble/

And you can use http://www.artlebedev.ru/kovodstvo/sections/159/rouble.otf




回答8:


You can fake it by using a strikethrough text decoration.

HTML 4.00 and earlier

Bunnies 100 <strike>P</strike>

Produces this: Bunnies 100 P

HTML 4.01 and later

Bunnies 100 <del>P</del>

Produces this: Bunnies 100 P

CSS text-decoration

Bunnies 100 <span style="text-decoration:line-through">P</span>

doesn't work in the SO renderer




回答9:


You also may use Armenian letter Ք, ք (Ke).




回答10:


I'll add something to all the other answers: be careful to NOT mix up the new ruble sign with the similar looking but quite different "Philippine peso" sign, '₱', encoded at U+20B1.

Doing a <strike>P</strike> will, depending on the font, look more like the Philippine peso sign than the russian ruble sign.




回答11:


Per this SO answer:

Research showed that in 2014 Russia changed their currency symbol so old fonts did not have the new Glyph so for others who have a similar issue, see if your font has been updated

The post's author also recommends using google's Roboto font. Personally I ran into problems with this unless I included all of the fonts subsets. Using standard font loader syntax, this works for me:

<link href="//fonts.googleapis.com/css?family=Roboto:100normal,100italic,300normal,300italic,400normal,400italic,500normal,500italic,700normal,700italic,900normal,900italic&amp;subset=all" rel="stylesheet" type="text/css">

Note that &amp;subset=all in the snippet above.

Alternatively if you're using typekit's Web Font Loader:

<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js"></script>
<script type="text/javascript">
WebFont.load({
  google: {
    families: [ 'Roboto::all' ]
  }
});

Again note :all in the example above.




回答12:


There are also two dedicated Bootstrap glyphicons for it:

<span class="glyphicon glyphicon-ruble"></span> <span class="glyphicon glyphicon-rub"></span>




回答13:


You may want to use the Intl.NumberFormat object.

var amount = 654321.987;

console.log(new Intl.NumberFormat('ru-RU', {
  style: 'currency',
  currency: 'RUB'
}).format(amount));



回答14:


I realize this is an old question, but I have a different answer... font awesome. They have a symbol for the Ruble. So long as you have Font Awesome available to your pages, you can include it like this:

<i class="fa fa-rub"></i>


来源:https://stackoverflow.com/questions/20665622/russian-ruble-symbol-html-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!