33

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?

Mark Amery
  • 143,130
  • 81
  • 406
  • 459
user3116402
  • 353
  • 1
  • 3
  • 5
  • I see [wikipedia](http://en.wikipedia.org/wiki/Russian_ruble) uses images. – Martin Smith Dec 18 '13 at 18:28
  • Since it's just been decided, I highly doubt the W3C has standardized it yet, font makers have created the character in fonts yet and browsers and OSs have been updated with all that yet. – deceze Dec 18 '13 at 18:30
  • 3
    This question is problematic though as when the situation changes the current answers will all be invalidated. – Martin Smith Dec 18 '13 at 18:30
  • 3
    @MartinSmith True, but that can happen with any changes in technology. Once a Unicode character is approved, these answers will be rendered obsolete, but they should still work even after there is a better way to do it. – techturtle Dec 18 '13 at 18:48

17 Answers17

33

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

Клаус Шварц
  • 3,158
  • 28
  • 44
  • 3
    A Microsoft update has added RUBLE SIGN to several fonts: http://support.microsoft.com/kb/2970228 But it is still probably safest to use `@font-face`, with a font like PT Sans, which includes RUBLE SIGN in several code positions, including the one that was allocated to it in Unciode. – Jukka K. Korpela Aug 15 '14 at 10:53
24

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

Large rendering in sans-serif style of the new Ruble symbol

Here is the official specification diagram of the symbol:

Diagram of new Ruble symobl

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
10

Use ₽ html mnemonic

₽ 100
userlond
  • 3,632
  • 2
  • 36
  • 53
5

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/₺).

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
  • 1
    The W3C does not implement such things, and no action is needed on its side. Adding the symbol to character codes will be handled by the Unicode Consortium and by ISO. Implementation in fonts is up to font manufacturers. No change to HTML or browsers is needed. – Jukka K. Korpela Dec 18 '13 at 19:09
4

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.

Michael Kruglos
  • 1,205
  • 14
  • 26
3

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.

PaulProgrammer
  • 16,175
  • 4
  • 39
  • 56
  • PT Sans has the ruble symbol in several code points, including U+20B9. This is technically incorrect (using a Private Use code point would be better, or less incorrect), and the shape of the symbol differs from the announced shape (though this *might* be seen as acceptable glyph variation). – Jukka K. Korpela Dec 18 '13 at 19:13
2

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

2

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

techturtle
  • 2,519
  • 5
  • 28
  • 54
2

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

miyconst
  • 483
  • 4
  • 8
2

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.

Miguel Farah
  • 146
  • 1
  • 1
  • 7
2

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.

Community
  • 1
  • 1
mralexlau
  • 1,823
  • 1
  • 16
  • 23
1

There are also two dedicated Bootstrap glyphicons for it:

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

1

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));
Penny Liu
  • 15,447
  • 5
  • 79
  • 98
1

Just search rubl sign using google, then find that sign and copy it. Now you have that symbol just pasting left. Paste everywhere you want. This is more simple way to do it.

You can copy it from here too. Now I left that symbol: ₽ Have a great coding, have much fun. .

0

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>
bcsteeve
  • 973
  • 9
  • 22
0

In Unicode, it is encoded at U+20BD ₽ RUBLE SIGN (HTML ₽ ). It can be entered on a Russian computer keyboard as AltGr + 8 on Windows and Linux, or AltGr + Р (Qwerty H position) on macOS.

0

use: ₽ code Everything is very simple

В А
  • 1