Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Web Tools Guide
Previous Page Home Next Page

File Encoding

The character encoding in XML, (X)HTML files, and JSP files can be specified and invoked in many different ways; however, we recommend that you specify the encoding in each one of your source files, for that is where many XML, HTML, JSP editors expect to find the encoding.

For example, for JSP files, you might use the pageEncoding attribute and/or the contentType attribute in the page directive, as shown in the following example:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
For XML files, you might use the encoding pseudo-attribute in the xml declaration at the start of a document or the text declaration at the start of an entity, as in the following example:
<?xml version="1.0" encoding="iso-8859-1" ?>
For (X)HTML files, you might use the <meta> tag inside the <head> tags, as shown in the following example:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire