if(this.currency.equalsIgnoreCase("₹")) {
r="₹ "+r;
}
I want to compare ₹
(Indian rupee symbol) in java. Here I am trying to print currency rupee symbol, but instead it is displaying the symbol like â?¹
.
How to overcome this problem?
You can try with:
if(this.currency.equals("\u20B9")) {
r="₹ "+r;
}
"\u20B9"
is the java encoding for rupee symbol.
More info:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With