‘ “ é == ‘ “ é, but on what encoding/reference?

11.2k views Asked by At

I have a ColdFusion script that does:

<cfset content = replace(content,"&##147;","""","all")>

Which replaces &147; by ". Google understands this too, if you type &#145; &#147; &#233; at its search box its transformed on the results page to ‘ “ é".

If I search for é on this HTML Entity Character Lookup page, it'll return &#233; to me. But and doesn't return 145 and 147.

So the question is, what's the numeric reference, character encoding, or whatever else, is being used here by ColdFusion? Where can I see that 145 maps to , 147 maps to and 233 maps to é?

Bonus thanks if someone provides a page listing these characters (since more are replaced on the script).

Edit: Havenard made me realize I was typing the wrong characters because my browser (Opera) was displaying them badly, so now I'm using Firefox to edit this question, and hopefully it'll be clear :)

Cheers,

3

There are 3 answers

0
inerte On BEST ANSWER

Found it. Windows-1252. Took me a long time but thanks everyone who tried to help :)

2
Gavrisimo On
0
Matteo Gariglio On

If you're working with ASP.NET, you can use HttpUtility Class as follow:

string s = System.Web.HttpUtility.HtmlDecode(content);

For more info: http://msdn.microsoft.com/en-us/library/System.Web.HttpUtility(v=vs.110).aspx