0

i'm using autoNumeric, a jQuery plugin that automatically formats currency. Everything works fine, but the euro sign (€) is replaced by question mark (�).

I have already read this and this, but it not seems to be an encoding problem couse I'm using the following meta tags on the page:

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

Also replacing exotic characters by their html friendly such as &euro; code in the autoNumeric options, did not solve the problem, it simply show &euro; 123,00 in the field input

$('#import').autoNumeric('init', {
        aSep: '.',
        aDec: ',',
        vMin: '-999999999.99',
        vMax: '999999999.99',
        aSign: '€' // also tried with '&euro;'
    });

If I replace euro sign with dollar sign (aSign: '$') it works fine!

Thanks in advance

Community
  • 1
  • 1
fasenderos
  • 388
  • 3
  • 18

1 Answers1

0

The problem might be due to character encoding mismatch (Refer)

Use unicode value for .

aSign : '\u20AC'

$('#import').autoNumeric('init', {
    aSep: '.',
    aDec: ',',
    vMin: '-999999999.99',
    vMax: '999999999.99',
    aSign : '\u20AC'
});
Community
  • 1
  • 1
Shaunak D
  • 20,588
  • 10
  • 46
  • 79