0

I'm trying to append a -sign to my textfield, but it's not showing right. All I get is a �-sign. I've tried the following:

$(priceText).val("€ " + price + ",-");
$(priceText).val("€ " + price + ",-"); 

as well as € and €

But nothing's worked so far. Can anyone help? If more info is required, please ask, new to SO.

Thanks in advance!

Shaunak D
  • 20,588
  • 10
  • 46
  • 79

1 Answers1

2

There is probably character encoding mismatch (Related),

Use unicode value \u20AC for € (Euro)

$(priceText).val("\u20AC " + price + ",-");
Community
  • 1
  • 1
Shaunak D
  • 20,588
  • 10
  • 46
  • 79