| <?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><%@ page language="java" contentType="text/html; charset=ISO-8859-1" |
| pageEncoding="ISO-8859-1"%></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><?xml version="1.0" encoding="iso-8859-1" ?></pre> |
| </div> |
| <div class="p">For (X)HTML files, you might use the <meta> tag inside the <head> |
| tags, as shown in the following example:<pre><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /></pre> |
| </div> |
| </div> |
| </body> |
| </html> |