Intl.NumberFormat() does not show the Bitcoin Ƀ Symbol

0 votes

the Intl.NumberFormat does not show the bitcoin symbol.

CFORMAT_USD = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'USD', minimumFractionDigits: 8 }); 
CFORMAT_BTC = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'BTC', minimumFractionDigits: 8 }); 

console.log(CFORMAT_USD.format(1000));
// 1.000,00000000 $

console.log(CFORMAT_BTC.format(1000));  
// 1.000,00000000 BTC

My workaround at the moment

console.log(CFORMAT_BTC.format(1000).replace(/BTC/,'Ƀ'));
// 1.000,00000000 Ƀ

Is there maybe a better (clean) solution?

Aug 27, 2018 in Blockchain by digger
• 27,620 points
58 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

According to bitcoin.it (https://en.bitcoin.it/wiki/Bitcoin_symbol),

The ISO 4217 currency code for Bitcoin is XBT. However, at the moment it is an unofficial code according to the ISO 4217 standard.

So the correct code should be

Intl.NumberFormat('de-DE', { style: 'currency', currency: 'XBT' })
answered Aug 27, 2018 by slayer
• 29,040 points

Related Questions In Blockchain

0 votes
2 answers

Why does not India consider Bitcoin as a legal tender?

to be specific there are few logical ...READ MORE

answered Jul 2, 2018 in Blockchain by Priyaj
• 56,100 points
45 views
0 votes
1 answer

Is it possible to claim Bitcoin Cash from an exchange that does not support it?

You can't claim BCH without knowing private ...READ MORE

answered Jul 17, 2018 in Blockchain by ariaholic
• 7,320 points
21 views
0 votes
1 answer

Bitcoin sendfrom does not process transaction

Try this; $wammount = floatval(trim($_POST['wammount'])); READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 27,620 points
17 views
0 votes
1 answer

"[RuntimeException] The "-t" option does not exist" error in Hyperledger composer.

This command runs on composer-cli. Have you ...READ MORE

answered Nov 21, 2018 in Blockchain by Omkar
• 65,820 points
124 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
42 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
61 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.