Contents of /xml/htdocs/proj/en/glep/glep-0031.html

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.4 - (show annotations) (download) (as text)
Mon Nov 7 22:26:59 2005 UTC (12 years, 9 months ago) by ciaranm
Branch: MAIN
Changes since 1.3: +20 -21 lines
File MIME type: text/html
Fix header typos, GLEP 1 compliance

1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!--
5 This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
6 PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
8 -->
9 <head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
12 <title>GLEP 31 -- Character Sets for Portage Tree Items</title>
13 <link rel="stylesheet" href="tools/glep.css" type="text/css" />
14 </head>
15 <body bgcolor="white">
16 <table class="navigation" cellpadding="0" cellspacing="0"
17 width="100%" border="0">
18 <tr><td class="navicon" width="150" height="35">
19 <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
20 <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]"
21 border="0" width="150" height="35" /></a></td>
22 <td class="textlinks" align="left">
23 [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
24 [<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>]
25 [<b><a href="./glep-0031.txt">GLEP Source</a></b>]
26 </td></tr></table>
27 <table class="rfc2822 docutils field-list" frame="void" rules="none">
28 <col class="field-name" />
29 <col class="field-body" />
30 <tbody valign="top">
31 <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">31</td>
32 </tr>
33 <tr class="field"><th class="field-name">Title:</th><td class="field-body">Character Sets for Portage Tree Items</td>
34 </tr>
35 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.4</td>
36 </tr>
37 <tr class="field"><th class="field-name">Author:</th><td class="field-body">Ciaran McCreesh &lt;ciaranm&#32;&#97;t&#32;gentoo.org&gt;</td>
38 </tr>
39 <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs/xml/htdocs/proj/en/glep/glep-0031.txt?cvsroot=gentoo">2005/10/30 21:35:50</a></td>
40 </tr>
41 <tr class="field"><th class="field-name">Status:</th><td class="field-body">Approved</td>
42 </tr>
43 <tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
44 </tr>
45 <tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="http://www.python.org/peps/glep-0012.html">text/x-rst</a></td>
46 </tr>
47 <tr class="field"><th class="field-name">Created:</th><td class="field-body">27-Oct-2004</td>
48 </tr>
49 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">28-Oct-2004, 1-Nov-2004, 11-Nov-2004</td>
50 </tr>
51 </tbody>
52 </table>
53 <hr />
54 <div class="contents topic" id="contents">
55 <p class="topic-title first"><a name="contents">Contents</a></p>
56 <ul class="simple">
57 <li><a class="reference" href="#abstract" id="id9" name="id9">Abstract</a></li>
58 <li><a class="reference" href="#status" id="id10" name="id10">Status</a></li>
59 <li><a class="reference" href="#motivation" id="id11" name="id11">Motivation</a></li>
60 <li><a class="reference" href="#specification" id="id12" name="id12">Specification</a><ul>
61 <li><a class="reference" href="#changelog-and-metadata-character-sets" id="id13" name="id13">ChangeLog and Metadata Character Sets</a></li>
62 <li><a class="reference" href="#ebuild-and-eclass-character-sets" id="id14" name="id14">Ebuild and Eclass Character Sets</a></li>
63 <li><a class="reference" href="#files-entries-character-sets" id="id15" name="id15">files/ Entries Character Sets</a></li>
64 <li><a class="reference" href="#suitable-characters-for-file-and-directory-names" id="id16" name="id16">Suitable Characters for File and Directory Names</a></li>
65 </ul>
66 </li>
67 <li><a class="reference" href="#backwards-compatibility" id="id17" name="id17">Backwards Compatibility</a></li>
68 <li><a class="reference" href="#references" id="id18" name="id18">References</a></li>
69 <li><a class="reference" href="#copyright" id="id19" name="id19">Copyright</a></li>
70 </ul>
71 </div>
72 <div class="section" id="abstract">
73 <h1><a class="toc-backref" href="#id9" name="abstract">Abstract</a></h1>
74 <p>A set of guidelines regarding what characters are permissible in the
75 portage tree and how they should be encoded is required.</p>
76 </div>
77 <div class="section" id="status">
78 <h1><a class="toc-backref" href="#id10" name="status">Status</a></h1>
79 <p>Approved on 8-Nov-2004 assuming that implementation will include
80 documentation for correctly encoding files within nano.</p>
81 </div>
82 <div class="section" id="motivation">
83 <h1><a class="toc-backref" href="#id11" name="motivation">Motivation</a></h1>
84 <p>At present we have several developers and many more users whose names
85 require characters (for example, accents) which are not part of the
86 standard 'safe' 0..127 ASCII range. There is no current standard on how
87 these should be represented, leading to inconsistency across the tree.</p>
88 <p>Although the issues involved have been discussed informally many times, no
89 official decision has been made.</p>
90 </div>
91 <div class="section" id="specification">
92 <h1><a class="toc-backref" href="#id12" name="specification">Specification</a></h1>
93 <div class="section" id="changelog-and-metadata-character-sets">
94 <h2><a class="toc-backref" href="#id13" name="changelog-and-metadata-character-sets">ChangeLog and Metadata Character Sets</a></h2>
95 <p>It is proposed that UTF-8 (<a class="footnote-reference" href="#id5" id="id1" name="id1">[1]</a>) is used for encoding ChangeLog and
96 metadata.xml files inside the portage tree.</p>
97 <p>UTF-8 allows the full range of Unicode (<a class="footnote-reference" href="#id6" id="id2" name="id2">[2]</a>) characters to be expressed,
98 which is necessary given the diversity of the Gentoo developer- and
99 user-base. It is character-compatible with ASCII for the 0..127
100 characters and does not significantly increase the storage requirements
101 for files which consist mainly of American English characters. It is
102 widely supported, widely used and an official standard.</p>
103 <p>The ISO-8859-* character sets (<a class="footnote-reference" href="#id7" id="id3" name="id3">[3]</a>) would <em>not</em> be appropriate since they
104 cannot express the full range of required characters.</p>
105 </div>
106 <div class="section" id="ebuild-and-eclass-character-sets">
107 <h2><a class="toc-backref" href="#id14" name="ebuild-and-eclass-character-sets">Ebuild and Eclass Character Sets</a></h2>
108 <p>For the same reasons as previously, it is proposed that UTF-8 is used as
109 the official encoding for ebuild and eclass files.</p>
110 <p>However, developers should be warned that any code which is parsed by bash
111 (in other words, non-comments), and any output which is echoed to the
112 screen (for example, einfo messages) or given to portage (for example any
113 of the standard global variables) must not use anything outside the
114 regular ASCII 0..127 range for compatibility purposes.</p>
115 </div>
116 <div class="section" id="files-entries-character-sets">
117 <h2><a class="toc-backref" href="#id15" name="files-entries-character-sets">files/ Entries Character Sets</a></h2>
118 <p>Patches must clearly be in the same character set as the file they are
119 patching. For other files/ entries (for example, GNOME desktop files),
120 consistency with the upstream-recommended character set is most sensible.</p>
121 </div>
122 <div class="section" id="suitable-characters-for-file-and-directory-names">
123 <h2><a class="toc-backref" href="#id16" name="suitable-characters-for-file-and-directory-names">Suitable Characters for File and Directory Names</a></h2>
124 <p>Characters outside the ASCII 0..127 range cannot safely be used for file
125 or directory names. (Of course, not all characters inside the ASCII 0..127
126 range can be used safely either.)</p>
127 </div>
128 </div>
129 <div class="section" id="backwards-compatibility">
130 <h1><a class="toc-backref" href="#id17" name="backwards-compatibility">Backwards Compatibility</a></h1>
131 <p>The existing tree uses a mixture of encodings. It would be straightforward
132 to fix existing ChangeLogs and metadata files to use UTF-8.</p>
133 <p>The <tt class="docutils literal"><span class="pre">echangelog</span></tt> tool is character-set agnostic. In order to properly
134 enter UTF-8, developers would have to switch to a UTF-8 shell session.
135 This only applies if the developer is entering new text which uses 'fancy'
136 characters -- existing characters are not mangled.</p>
137 <p>Certain text editors are incapable of handling UTF-8 cleanly. However,
138 since the <tt class="docutils literal"><span class="pre">echangelog</span></tt> tool is generally the correct way to generate
139 ChangeLog entries, this should not be a major problem. Generating
140 metadata.xml files correctly in these editors could become problematic.
141 The <tt class="docutils literal"><span class="pre">vim</span></tt> and <tt class="docutils literal"><span class="pre">emacs</span></tt> editors, which appear to be most widely used,
142 are both capable of handling UTF-8 cleanly -- for vim, this could be
143 configured automatically via the <tt class="docutils literal"><span class="pre">gentoo-syntax</span></tt> (<a class="footnote-reference" href="#id8" id="id4" name="id4">[4]</a>) package.</p>
144 </div>
145 <div class="section" id="references">
146 <h1><a class="toc-backref" href="#id18" name="references">References</a></h1>
147 <table class="docutils footnote" frame="void" id="id5" rules="none">
148 <colgroup><col class="label" /><col /></colgroup>
149 <tbody valign="top">
150 <tr><td class="label"><a class="fn-backref" href="#id1" name="id5">[1]</a></td><td><a class="reference" href="http://www.faqs.org/rfcs/rfc3629.html">RFC 3629</a>: UTF-8, a transformation format of ISO 10646
151 <a class="reference" href="http://www.ietf.org/rfc/rfc3629.txt">http://www.ietf.org/rfc/rfc3629.txt</a></td></tr>
152 </tbody>
153 </table>
154 <table class="docutils footnote" frame="void" id="id6" rules="none">
155 <colgroup><col class="label" /><col /></colgroup>
156 <tbody valign="top">
157 <tr><td class="label"><a class="fn-backref" href="#id2" name="id6">[2]</a></td><td>ISO/IEC 10646 (Universal Multiple-Octet Coded Character Set)</td></tr>
158 </tbody>
159 </table>
160 <table class="docutils footnote" frame="void" id="id7" rules="none">
161 <colgroup><col class="label" /><col /></colgroup>
162 <tbody valign="top">
163 <tr><td class="label"><a class="fn-backref" href="#id3" name="id7">[3]</a></td><td>ISO/IEC 8859 (8-bit single-byte coded graphic character sets)</td></tr>
164 </tbody>
165 </table>
166 <table class="docutils footnote" frame="void" id="id8" rules="none">
167 <colgroup><col class="label" /><col /></colgroup>
168 <tbody valign="top">
169 <tr><td class="label"><a class="fn-backref" href="#id4" name="id8">[4]</a></td><td>The app-vim/gentoo-syntax package,
170 <a class="reference" href="https://developer.berlios.de/projects/gentoo-syntax/">https://developer.berlios.de/projects/gentoo-syntax/</a></td></tr>
171 </tbody>
172 </table>
173 </div>
174 <div class="section" id="copyright">
175 <h1><a class="toc-backref" href="#id19" name="copyright">Copyright</a></h1>
176 <p>This document has been placed in the public domain.</p>
177 <!-- vim: set tw=74 fileencoding=utf-8 : -->
178 </div>
180 </div>
181 <div class="footer">
182 <hr class="footer" />
183 <a class="reference" href="glep-0031.txt">View document source</a>.
184 Generated on: 2005-11-07 22:15 UTC.
185 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
187 </div>
188 </body>
189 </html>

  ViewVC Help
Powered by ViewVC 1.1.20