blob: 1b63f4d240e9a4281993637c100fefb5895f28f9 [file] [log] [blame]
<?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>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2008 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" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="File Encoding" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta content="character encoding, location in files, JSP files, XHTML, XML" name="DC.subject" />
<meta content="character encoding, location in files, JSP files, XHTML, XML" name="keywords" />
<meta content="XHTML" name="DC.Format" />
<meta content="cencoding" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>File Encoding</title>
</head>
<body id="cencoding"><a name="cencoding"><!-- --></a>
<h1 class="topictitle1">File Encoding</h1>
<div><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>