I am reading a text file with an ajax function. All’s well so far.
There appears to be a special character written to the file when the entry is created.
I assume it to the the apostrophe character (‘), but in the file it looks like 222
and in the screen display it looks like a blue-diamond with a question mark.
When I view it with an editor, it appears to be one (not 4) characters.
I am trying to replace the single character 222 with the apostrophe using:
[code]
tmp = str.replace(/[222]/g ,”‘”)
// have also tried this
// tmp = str.replace(/[\222]/g ,”‘”)
but this does not seem to work as the odd display continues to appear.
I’m reading a UNIX text file if that makes a difference, but I don’t think so.
Any ideas how to replace the single character 222 with the apostrope?