/[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.15 Revision 1.16
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.15 2005/05/29 16:00:59 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/utf-8.xml,v 1.16 2005/06/02 18:36:28 swift 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
18specifically UTF-8. 18specifically UTF-8.
19</abstract> 19</abstract>
20 20
21<license /> 21<license />
22 22
23<version>2.0</version> 23<version>2.1</version>
24<date>2005-05-08</date> 24<date>2005-06-02</date>
25 25
26<chapter> 26<chapter>
27<title>Character Encodings</title> 27<title>Character Encodings</title>
28<section> 28<section>
29<title>What is a Character Encoding?</title> 29<title>What is a Character Encoding?</title>
226<section> 226<section>
227<title>Setting the Locale</title> 227<title>Setting the Locale</title>
228<body> 228<body>
229 229
230<p> 230<p>
231There are two environment variables that need to be set in order to use 231There is one environment variables that needs to be set in order to use
232our new UTF-8 locales: <c>LANG</c> and <c>LC_ALL</c>. There are also 232our new UTF-8 locales: <c>LC_ALL</c> (this variable overrides the <c>LANG</c> setting as well). There are also
233many different ways to set them; some people prefer to only have a UTF-8 233many different ways to set it; some people prefer to only have a UTF-8
234environment for a specific user, in which case they set them in their 234environment for a specific user, in which case they set them in their
235<path>~/.profile</path> or <path>~/.bashrc</path>. Others prefer to set the 235<path>~/.profile</path> or <path>~/.bashrc</path>. Others prefer to set the
236locale globally. One specific circumstance where the author particularly 236locale globally. One specific circumstance where the author particularly
237recommends doing this is when <path>/etc/init.d/xdm</path> is in use, because 237recommends doing this is when <path>/etc/init.d/xdm</path> is in use, because
238this init script starts the display manager and desktop before any of the 238this init script starts the display manager and desktop before any of the
247</p> 247</p>
248 248
249<pre caption="Demonstration /etc/env.d/02locale"> 249<pre caption="Demonstration /etc/env.d/02locale">
250<comment>(As always, change "en_GB.UTF-8" to your locale)</comment> 250<comment>(As always, change "en_GB.UTF-8" to your locale)</comment>
251LC_ALL="en_GB.UTF-8" 251LC_ALL="en_GB.UTF-8"
252LANG="en_GB.UTF-8"
253</pre> 252</pre>
254 253
255<p> 254<p>
256Next, the environment must be updated with the change. 255Next, the environment must be updated with the change.
257</p> 256</p>
268variables in our environment: 267variables in our environment:
269</p> 268</p>
270 269
271<pre caption="Checking if our new locale is in the environment"> 270<pre caption="Checking if our new locale is in the environment">
272# <i>locale</i> 271# <i>locale</i>
273LANG=en_GB.UTF-8 272LANG=
274LC_CTYPE="en_GB.UTF-8" 273LC_CTYPE="en_GB.UTF-8"
275LC_NUMERIC="en_GB.UTF-8" 274LC_NUMERIC="en_GB.UTF-8"
276LC_TIME="en_GB.UTF-8" 275LC_TIME="en_GB.UTF-8"
277LC_COLLATE="en_GB.UTF-8" 276LC_COLLATE="en_GB.UTF-8"
278LC_MONETARY="en_GB.UTF-8" 277LC_MONETARY="en_GB.UTF-8"

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20