Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
blob: a63fabd6e93588b30102a33542cd0b0d171c899d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<!-- /*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>File Encoding</title>
</head>
<body id="cencoding"><a name="cencoding"><!-- --></a>
<h1 class="topictitle1">File Encoding</h1>
<div><p></p>
<p> 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.</p>
<div class="p">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:<pre>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%&gt;</pre>
</div>
<div class="p">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: <pre>&lt;?xml version="1.0" encoding="iso-8859-1" ?&gt;</pre>
</div>
<div class="p">For (X)HTML files, you might use the &lt;meta&gt; tag inside the &lt;head&gt;
tags, as shown in the following example:<pre>&lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8" /&gt;</pre>
</div>
</div>
</body>
</html>

Back to the top