/[gentoo]/xml/htdocs/doc/en/utf-8.xml
Gentoo

Diff of /xml/htdocs/doc/en/utf-8.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.27 Revision 1.28
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/utf-8.xml,v 1.27 2005/07/02 11:55:16 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/utf-8.xml,v 1.28 2005/07/04 06:21:14 fox2mike Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/utf-8.xml"> 5<guide link="/doc/en/utf-8.xml">
6<title>Using UTF-8 with Gentoo</title> 6<title>Using UTF-8 with Gentoo</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="slarti@gentoo.org">Thomas Martin</mail> 9 <mail link="slarti@gentoo.org">Thomas Martin</mail>
10</author> 10</author>
11<author title="Contributor"> 11<author title="Contributor">
12 <mail link="devil@gentoo.org.ua">Alexander Simonov</mail> 12 <mail link="devil@gentoo.org.ua">Alexander Simonov</mail>
13</author> 13</author>
14<author title="Editor"> 14<author title="Editor">
15 <mail link="fox2mike@gentoo.org">Shyam Mani</mail> 15 <mail link="fox2mike@gentoo.org">Shyam Mani</mail>
16</author> 16</author>
17 17
18<abstract> 18<abstract>
19This guide shows you how to set up and use the UTF-8 Unicode character set with 19This guide shows you how to set up and use the UTF-8 Unicode character set with
20your Gentoo Linux system, after explaining the benefits of Unicode and more 20your Gentoo Linux system, after explaining the benefits of Unicode and more
21specifically UTF-8. 21specifically UTF-8.
22</abstract> 22</abstract>
23 23
24<!-- The content of this document is licensed under the CC-BY-SA license --> 24<!-- The content of this document is licensed under the CC-BY-SA license -->
25<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 25<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
26<license /> 26<license />
27 27
28<version>2.7</version> 28<version>2.8</version>
29<date>2005-07-02</date> 29<date>2005-07-04</date>
30 30
31<chapter> 31<chapter>
32<title>Character Encodings</title> 32<title>Character Encodings</title>
33<section> 33<section>
34<title>What is a Character Encoding?</title> 34<title>What is a Character Encoding?</title>
35<body> 35<body>
36 36
37<p> 37<p>
38Computers do not understand text themselves. Instead, every character is 38Computers do not understand text themselves. Instead, every character is
39represented by a number. Traditionally, each set of numbers used to represent 39represented by a number. Traditionally, each set of numbers used to represent
40alphabets and characters (known as a coding system, encoding or character set) 40alphabets and characters (known as a coding system, encoding or character set)
41was limited in size due to limitations in computer hardware. 41was limited in size due to limitations in computer hardware.
42</p> 42</p>
43 43
44</body> 44</body>
329do is to build UTF-8 NLS support into your kernel, and change the default NLS 329do is to build UTF-8 NLS support into your kernel, and change the default NLS
330option to utf8. 330option to utf8.
331</p> 331</p>
332 332
333<pre caption="Kernel configuration steps for UTF-8 NLS"> 333<pre caption="Kernel configuration steps for UTF-8 NLS">
334File Systems --&gt; 334File Systems --&gt;
335 Native Language Support --&gt; 335 Native Language Support --&gt;
336 (utf8) Default NLS Option 336 (utf8) Default NLS Option
337 &lt;*&gt; NLS UTF8 337 &lt;*&gt; NLS UTF8
338 <comment>(Also &lt;*&gt; other character sets that are in use in 338 <comment>(Also &lt;*&gt; other character sets that are in use in
339 your FAT filesystems or Joilet CD-ROMs.)</comment> 339 your FAT filesystems or Joilet CD-ROMs.)</comment>
340</pre> 340</pre>
341 341
342<p> 342<p>
343If you plan on mounting NTFS partitions, you may need to specify an <c>nls=</c> 343If you plan on mounting NTFS partitions, you may need to specify an <c>nls=</c>
344option with mount. For more information, see <c>man mount</c>. 344option with mount. If you plan on mounting FAT partitions, you many need to
345specify a <c>codepage=</c> option with mount. Optionally, you can also set a
346default codepage for FAT in the kernel configuration. Note that the
347<c>codepage</c> option with mount will override the kernel settings.
348</p>
349
350<pre caption="FAT settings in kernel configuration">
351File Systems --&gt;
352 DOS/FAT/NT Filesystems --&gt;
353 (437) Default codepage for fat
354</pre>
355
356<p>
357You should avoid setting <c>Default iocharset for fat</c> to UTF-8, as it is
358not recommended. Instead, you may want to pass the option utf8=true when
359mounting your FAT partitions. For further information, see <c>man mount</c> and
360the kernel documentation at
361<path>/usr/src/linux/Documentation/filesystems/vfat.txt</path>.
345</p> 362</p>
346 363
347<p> 364<p>
348For changing the encoding of filenames, <c>app-text/convmv</c> can be used. 365For changing the encoding of filenames, <c>app-text/convmv</c> can be used.
349</p> 366</p>
350 367
351<pre caption="Example usage of convmv"> 368<pre caption="Example usage of convmv">
352# <i>emerge --ask app-text/convmv</i> 369# <i>emerge --ask app-text/convmv</i>
353# <i>convmv -f current-encoding -t utf-8 filename</i> 370# <i>convmv -f current-encoding -t utf-8 filename</i>
354</pre> 371</pre>
355 372
356<p> 373<p>
357For changing the <e>contents</e> of files, use the <c>iconv</c> utility, 374For changing the <e>contents</e> of files, use the <c>iconv</c> utility,
358bundled with <c>glibc</c>: 375bundled with <c>glibc</c>:
359</p> 376</p>

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.20