Browse Source

Add FAQ for national characters in build files.

Submitted by:	Mark Stehr <Mark.Stehr@dvg.de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272037 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
7006529fb9
2 changed files with 70 additions and 0 deletions
  1. +49
    -0
      docs/faq.html
  2. +21
    -0
      xdocs/faq.xml

+ 49
- 0
docs/faq.html View File

@@ -216,6 +216,10 @@
<code>&lt;include&gt;</code> of just the files I want, but it
isn't giving me any files at all. What's wrong?
</a></li>
<li><a href="#encoding">
How can I include national characters like German
umlauts in my build file?
</a></li>
</ul>
</blockquote>
@@ -1243,6 +1247,51 @@ shell-prompt&gt; cat &lt; foo
</blockquote>
</td></tr>
</table>
</a>
<a name="encoding">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How can I include national characters like German
umlauts in my build file?
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>You need to tell the XML parser which character encoding
your build file uses, this is done inside the <a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-prolog-dtd">XML
declaration</a>.</p>
<p>By default the parser assumes you are using the UTF-8
encoding instead of your platform's default. For most western
european contries you should set the encoding to
<code>ISO-8859-1</code>. To do so, make the very first line
of you build file read like</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
</blockquote>
</td></tr>
</table>
</a>
<a name="integration">
<table border="0" cellspacing="0" cellpadding="2" width="100%">


+ 21
- 0
xdocs/faq.xml View File

@@ -564,6 +564,27 @@ shell-prompt> cat < foo
</answer>
</faq>
<faq id="encoding">
<question>How can I include national characters like German
umlauts in my build file?</question>

<answer>
<p>You need to tell the XML parser which character encoding
your build file uses, this is done inside the <a
href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-prolog-dtd">XML
declaration</a>.</p>

<p>By default the parser assumes you are using the UTF-8
encoding instead of your platform's default. For most western
european contries you should set the encoding to
<code>ISO-8859-1</code>. To do so, make the very first line
of you build file read like</p>

<source><![CDATA[
<?xml version="1.0" encoding="ISO-8859-1" ?>
]]></source>
</answer>
</faq>
</faqsection>

<faqsection title="Ant and IDEs/Editors">


Loading…
Cancel
Save