I have created the following .cfm file using the CFML editor of CFEclipse in Aptana 3:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>templates</title>
</head>
<body>
£
</body>
</html>
My Workspace encoding is set to UTF-8, but when I save and view the file in a browser my pound sign has changed to £.
I can resolve the problem by adding
<cfprocessingdirective pageencoding = "utf-8"/>
to the top of my CFM file but for the website I am working on I can't realisticly do that for every page and I've tried adding it to the page header include but that doesn't work.
If I save the file as HTML file or save the file using notepad utf-8 the pound sign is fine, so it seems to be related to the CFML editor of the CFEclipse plugin in Aptana. Has anyone come across this issue before or have any ideas on how to resolve it?
Thanks
EDIT (Added charset headers) :
HTTP/1.1 200 OK
Date: Thu, 06 Oct 2011 13:26:11 GMT
Server: Apache/2.2.17 (Win32) PHP/5.3.4 JRun/4.0
Set-Cookie: CFGLOBALS=urltoken%3DCFID%23%3D12703%26CFTOKEN%23%3D40776140%23lastvisit%3D%7Bts%20%272011%2D10%2D06%2014%3A26%3A11%27%7D%23timecreated%3D%7Bts%20%272011%2D10%2D04%2017%3A05%3A01%27%7D%23hitcount%3D314%23cftoken%3D40776140%23cfid%3D12703%23;expires=Sat, 28-Sep-2041 13:26:11 GMT;path=/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
GET /enc_test3.cfm HTTP/1.1
Host: www.foo.co.uk
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive