Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » HTML encoding cp1252
HTML encoding cp1252 [message #544992] Tue, 06 July 2010 09:50 Go to next message
Rik Missing name is currently offline Rik Missing nameFriend
Messages: 7
Registered: July 2009
Junior Member
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? Rolling Eyes
Re: HTML encoding cp1252 [message #545070 is a reply to message #544992] Tue, 06 July 2010 14:55 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi,

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.

Hope this helps

Wolfgang
Re: HTML encoding cp1252 [message #545127 is a reply to message #545070] Tue, 06 July 2010 17:47 Go to previous messageGo to next message
Rik Missing name is currently offline Rik Missing nameFriend
Messages: 7
Registered: July 2009
Junior Member
Yes it works!
The only problem is that I must remember to do not enter preferences->web->html and touch encoding or I loose everything.

There, the combo now shows UTF-8. I suppose is only due to the fact that Eclipse doesn't find a match in the combo list and use the first element.

Thank's a lot!
Re: HTML encoding cp1252 [message #545234 is a reply to message #545127] Wed, 07 July 2010 09:17 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi,

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).

Best regards

Wolfgang
Re: HTML encoding cp1252 [message #545278 is a reply to message #545234] Wed, 07 July 2010 10:58 Go to previous messageGo to next message
Rik Missing name is currently offline Rik Missing nameFriend
Messages: 7
Registered: July 2009
Junior Member
OK.
Re: HTML encoding cp1252 [message #546341 is a reply to message #544992] Mon, 12 July 2010 14:04 Go to previous messageGo to next message
Rik Missing name is currently offline Rik Missing nameFriend
Messages: 7
Registered: July 2009
Junior Member
Done.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319284

Maybe they'll add "Others" into the combo, and IANA field will become editable.
icon14.gif  Re: HTML encoding cp1252 [message #546865 is a reply to message #544992] Wed, 14 July 2010 13:15 Go to previous message
Rik Missing name is currently offline Rik Missing nameFriend
Messages: 7
Registered: July 2009
Junior Member
A patch has been created (source code), so new versions will not have this problem.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319284

Smile
Previous Topic:WTP 3.2 and Tomcat 7 - webapp defined context.xml is broken
Next Topic:Can anyone explain this JSP validation warning?
Goto Forum:
  


Current Time: Fri Apr 19 20:04:29 GMT 2024

Powered by FUDForum. Page generated in 0.03447 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top