Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » a encoding problem with wtp in helios
a encoding problem with wtp in helios [message #559637] Fri, 17 September 2010 09:31 Go to next message
Eclipse UserFriend
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 10:54 Go to previous messageGo to next message
Eclipse UserFriend
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 06:12 Go to previous messageGo to next message
Eclipse UserFriend
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 05:33 Go to previous messageGo to next message
Eclipse UserFriend
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 08:14 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 02:09:30 EDT 2025

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

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

Back to the top