Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » The content type in preference page can't change the default encoding?
The content type in preference page can't change the default encoding? [message #1386655] Thu, 19 June 2014 04:46 Go to next message
Alex Liu is currently offline Alex Liu
Messages: 2
Registered: June 2014
Junior Member
My JSP file's default page encoding and charset are ISO-8859-1, so when I hava some Chinese chars in the page, I will receive some errors, so I want to change the default encoding of the jsp files. at first I use "Windows-->Preferences-->Content Types-->Default Encoding", I changed it into UTF-8, however, when I created a new jsp file the default page encoding and charset are still ISO-8859-1:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body>
</html>


THEN, I change the "Windows-->Preferences-->Web-->JSP Files" and I change the encoding into UTF-8, and this time, when I create a new jsp file the page encoding and charset are UTF-8.
what's the difference between "Wondows-->Preferences-->General-->Content Types" and "Windows --> Preferences --> Web", why the former configuration can not change the default page encoding and charset of the JSP files?
Re: The content type in preference page can't change the default encoding? [message #1386692 is a reply to message #1386655] Thu, 19 June 2014 09:48 Go to previous message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2230
Registered: July 2009
Senior Member
Moving this to the Web Tools forum.
Previous Topic:Servlet class files not included in exported war
Next Topic:JSDT Extension: how to filter Project path dynamically?
Goto Forum:
  


Current Time: Wed Aug 27 23:27:55 EDT 2014

Powered by FUDForum. Page generated in 0.01491 seconds