1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
* Copyright � 2007 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
8
<title>About File Encodings</title>
9
<link href="../ide.css" rel="stylesheet" type="text/css">
13
<h2>About File Encodings</h2>
15
<p><small><a href="#seealso">See Also</a></small></p>
17
<p>When creating a file for a project, the files are created using the specified
18
<a href="../project/proj_encoding.html">project encoding</a>. Some file types
19
declare the encoding in the file, e.g. HTML, JSP, and XML files. Therefore,
20
when the IDE creates these files, it automatically includes character encoding
21
declarations in the file template.</p>
23
<p>When determining the character encoding for a file, the IDE applies the
24
FileEncodingQuery (FEQ) layer model. It first determines whether the encoding
25
is declared in the file. If no encoding declaration can be found, the IDE
26
presumes the file encoding is specified by the project's encoding property.
27
If the project encoding is not specified (e.g. imported or older projects),
28
the IDE applies the encoding set by the environment in which it runs.</p>
30
<h3>Setting Character Encoding for Files</h3>
32
<p>To change the encoding for a file (e.g. HTMl, XML, or JSP files) you need
33
to change the encoding and charset specified in the corresponding tag in
34
the file. When an encoding is specified in a file, this setting overrides
35
the encoding set in the project.</p>
37
<h4>To manually change the character encoding for a file:</h4>
40
<li>Open the file in the Source editor.</li>
41
<li>Modify the encoding and charset tags for the file, if available.</li>
46
<li>The IDE does not convert characters when the encoding of a file changes.
47
If you manually change the encoding declaration within the file, and that
48
encoding does not match the project encoding, you may encounter problems when
49
compiling and running the project. This is due to the fact that the encoding tag
50
affects how file contents are viewed internally - not only during runtime,
51
but also during the design phase (i.e. adding content in the Source Editor).</li>
52
<li>Manually changing the character encoding declaration within a file changes
53
how the IDE reads and displays that file. When you change the file encoding,
54
the IDE does not convert the existing contents of the file to the new encoding.
55
Care should be taken when changing the encoding of a file because the file
56
may contain characters that cannot be saved or that may not display properly
57
in the new encoding.</li>
61
<dt><a name="seealso">See Also</a></dt>
62
<dd><a href="../project/proj_encoding.html">About Project Encodings</a></dd>
66
<small><a href="../credits.html">Legal Notices</a></small>
68
<table border="0" cellpadding="50"><tr><td> </td></tr></table>
b'\\ No newline at end of file'