Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » a encoding problem with wtp in helios
a encoding problem with wtp in helios [message #559637] Fri, 17 September 2010 13:31 Go to next message
lhu Missing name is currently offline lhu Missing name
Messages: 3
Registered: September 2010
Junior Member
hi everyone,

I import my project in the eclipse(helios fresh download). the source file(xhtml and java) are created with cp1252, but only the java file is shown correctly. I changed content-type of html file to test, I found the new text typed is encoding in utf-8, and the old is still in cp1252. I cant find where i can change this.
actually parameter is :
preference>>general>>workspace>>text file encoding = cp1252
preference>>general>>content types>>html>>default encoding = empty
preference>>web>>html files>>encoding =iso latin-1
preference>>web>>html files>>loading files=use workspace encoding.

Someone can help me?
thanks in advance
Re: a encoding problem with wtp in helios [message #559968 is a reply to message #559637] Mon, 20 September 2010 14:54 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick Sandonato
Messages: 126
Registered: July 2009
Senior Member
Hi,

The HTML editor should first attempt to detect the encoding of the document based on any encoding defined within the file. For example, if you have <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> in your document, we set the encoding of the document as "ISO-8859-1". In the absence of this information, the workspace default should be picked up (mine was encoding with cp1252 off the bat).

If you haven't tried it yet, you can manually set the default encoding for the HTML content type by selecting HTML from the Content Types preference page and set cp1252 as the encoding and press the Update button and the OK. This should force the encoding to be cp1252 if you haven't defined an encoding otherwise in your HTML document.
Re: a encoding problem with wtp in helios [message #628822 is a reply to message #559968] Fri, 24 September 2010 10:12 Go to previous messageGo to next message
lhu Missing name is currently offline lhu Missing name
Messages: 3
Registered: September 2010
Junior Member
hi,

thanks for your reply. i find out it is utf-8 by default for facelet component. i did not know wtp has a special categ for it.

why a encoding by type of file?

thank you very much.

liu
Re: a encoding problem with wtp in helios [message #642918 is a reply to message #628822] Fri, 03 December 2010 10:33 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 1
Registered: December 2010
Junior Member
Hi,

How can you change the default UTF-8 for facelet pages (xhtml) ?

Yan.
Re: a encoding problem with wtp in helios [message #642945 is a reply to message #642918] Fri, 03 December 2010 13:14 Go to previous message
Hans Missing name is currently offline Hans Missing name
Messages: 2
Registered: December 2010
Location: Zurich
Junior Member
Default text file encoding can be set as follows:

Open: Window/Preferences/General/Workspace.

On windows default is Cp1252. select Other and the your preferred encoding. e.g. UTF-8

scroll down to Web/CSS, Web/HTML, etc. On each configuration page select desired encoding.

that's all. Works fine. My projects are set to UTF-8.
Previous Topic:Installing WTP and Prerequisites
Next Topic:RESTful project on Glassfish results in resource not available
Goto Forum:
  


Current Time: Tue Oct 21 19:56:41 GMT 2014

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

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