/[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.28 Revision 1.29
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.28 2005/07/04 06:21:14 fox2mike Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/utf-8.xml,v 1.29 2005/07/10 11:12:10 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.8</version> 28<version>2.9</version>
29<date>2005-07-04</date> 29<date>2005-07-10</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>
355 355
356<p> 356<p>
357You should avoid setting <c>Default iocharset for fat</c> to UTF-8, as it is 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 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 359mounting your FAT partitions. For further information, see <c>man mount</c> and
360the kernel documentation at 360the kernel documentation at
361<path>/usr/src/linux/Documentation/filesystems/vfat.txt</path>. 361<path>/usr/src/linux/Documentation/filesystems/vfat.txt</path>.
362</p> 362</p>
363 363
364<p> 364<p>
365For 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.
366</p> 366</p>
367 367
368<pre caption="Example usage of convmv"> 368<pre caption="Example usage of convmv">
369# <i>emerge --ask app-text/convmv</i> 369# <i>emerge --ask app-text/convmv</i>
370<comment>(Command format)</comment>
370# <i>convmv -f current-encoding -t utf-8 filename</i> 371# <i>convmv -f &lt;current-encoding&gt; -t utf-8 &lt;filename&gt;</i>
372<comment>(Substitute iso-8859-1 with the charset you are converting
373from)</comment>
374# <i>convmv -f iso-8859-1 -t utf-8 filename</i>
371</pre> 375</pre>
372 376
373<p> 377<p>
374For changing the <e>contents</e> of files, use the <c>iconv</c> utility, 378For changing the <e>contents</e> of files, use the <c>iconv</c> utility,
375bundled with <c>glibc</c>: 379bundled with <c>glibc</c>:
376</p> 380</p>
377 381
378<pre caption="Example usage of iconv"> 382<pre caption="Example usage of iconv">
379<comment>(substitute iso-8859-1 with the charset you are converting from)</comment> 383<comment>(substitute iso-8859-1 with the charset you are converting from)</comment>
380<comment>(Check the output is sane)</comment> 384<comment>(Check the output is sane)</comment>
381# <i>iconv -f iso-8859-1 -t utf-8 filename</i> 385# <i>iconv -f iso-8859-1 -t utf-8 filename</i>
382<comment>(Convert a file, you must create another file)</comment> 386<comment>(Convert a file, you must create another file)</comment>
383# <i>iconv -f iso-8859-1 -t utf-8 filename > newfile</i> 387# <i>iconv -f iso-8859-1 -t utf-8 filename > newfile</i>
384</pre> 388</pre>
385 389

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

  ViewVC Help
Powered by ViewVC 1.1.20