Hello,
I'm having some trouble with a £ sign, it's being displayed to the user as the <?> question-mark-in-a-black-diamond icon.
I have an SQL Server database with a £ in a table. (Collation Latin_General_C1_AS which is analoguous to 8859-1)
I have a PHP script which retreives this record without issue and can display it on a web page OK. This is with the PHP script file's encoding set to UTF-8 without BOM.
The issue appears to be displaying the page in an AJAX request.
var http = new XMLHttpRequest;
...
document.getElementById('myDivElement').innerHTML = http.responseText;
http.responseText appears to be treating the results of the response text as plain old binary ascii and therefore loosing the £ character.
I'm sure this has to be a common issue as JS/AJAX is everywhere now and £ signs are kind of common in the United Kingdom (usually coloured in red and preceded by a - sign if my online banking is anything to go by)
I must be overtired/undercaffeined or something because I have tried and failed to work the Google machine to find the answer.
What is the usual resolution to displaying a £ sign through an AJAX request please?
Thanks
Ben