Little Problem: in preferences->web->html->Encoding, I can't enter an arbitrary IANA name/encoding nor I find what I need (Windows-1252 or equivalent cp1252). I can do that for workspace file encoding or project encoding, but not on html encoding.
So happens that when I create a new html file, automatically I got a meta http-equiv that I must change manually from utf-8 or iso-8859-1 to windows-1252 or cp1252
<meta http-equiv="Content-Type" content="text/html; charset=cp1252" />
This happens on Linux but also on Windows platform.
A simple solution is to change the template, but I want anyway hilight this point because:
Quote:
the draft HTML 5 specification requires that documents advertised as ISO-8859-1 actually be parsed with the Windows-1252 encoding.
So, shouldn't be possibile to set html encoding to cp1252 or Windows-1252?
I think I can provide you with a dirty workaround ;-).
Check the file
" workspace\.metadata\.plugins\org.eclipse.core.runtime\.setti ngs\org.eclipse.wst.html.core.prefs ".
It should look like this:
#Tue Jul 06 16:38:56 CEST 2010
outputCodeset=ISO-8859-1
eclipse.preferences.version=1
If the file is missing or the line "outputCodeset" is not available, you can
force creation of if by setting the default encoding in Preferences => "Web" =>
"HTML Files" => combobox "Encoding" to something different.
Change the prefs file to e.g. this (exit Eclipse before doing so!):
#Tue Jul 06 16:38:56 CEST 2010
outputCodeset=Windows-1252
eclipse.preferences.version=1
Now, the combobox in the preferences will show a totally different encoding, but
new HTML files should be "Cp1252" now.
you might create a Bugzilla feature request to add some more encodings to this
list (it seems to be a matter of the combobox, and it applies to XML files as well).