- Add some entities for authors
[kai/samba.git] / docs / docbook / projdoc / unicode.sgml
1 <chapter id="unicode">
2 <chapterinfo>
3         &author.jelmer;
4         <pubdate>25 March 2003</pubdate>
5 </chapterinfo>
6
7 <title>Unicode/Charsets</title>
8
9 <sect1>
10 <title>What are charsets and unicode?</title>
11
12 <para>
13 Computers communicate in numbers. In texts, each number will be 
14 translated to a corresponding letter. The meaning that will be assigned 
15 to a certain number depends on the <emphasis>character set(charset)
16 </emphasis> that is used. 
17 A charset can be seen as a table that is used to translate numbers to 
18 letters. Not all computers use the same charset (there are charsets 
19 with German umlauts, Japanese characters, etc). Usually a charset contains 
20 256 characters, which means that storing a character with it takes 
21 exactly one byte. </para>
22
23 <para>
24 There are also charsets that support even more characters, 
25 but those need twice(or even more) as much storage space. These 
26 charsets can contain <command>256 * 256 = 65536</command> characters, which
27 is more then all possible characters one could think of. They are called 
28 multibyte charsets (because they use more then one byte to 
29 store one character). 
30 </para>
31
32 <para>
33 A standardised multibyte charset is unicode, info available at 
34 <ulink url="http://www.unicode.org/">www.unicode.org</ulink>. 
35 Big advantage of using a multibyte charset is that you only need one; no 
36 need to make sure two computers use the same charset when they are 
37 communicating.
38 </para>
39
40 <para>Old windows clients used to use single-byte charsets, named 
41 'codepages' by microsoft. However, there is no support for 
42 negotiating the charset to be used in the smb protocol. Thus, you 
43 have to make sure you are using the same charset when talking to an old client.
44 Newer clients (Windows NT, 2K, XP) talk unicode over the wire.
45 </para>
46 </sect1>
47
48 <sect1>
49 <title>Samba and charsets</title>
50
51 <para>
52 As of samba 3.0, samba can (and will) talk unicode over the wire. Internally, 
53 samba knows of three kinds of character sets: 
54 </para>
55
56 <variablelist>
57         <varlistentry>
58                 <term>unix charset</term>
59                 <listitem><para>
60                 This is the charset used internally by your operating system. 
61                 The default is <emphasis>ASCII</emphasis>, which is fine for most 
62                 systems.
63                 </para></listitem>
64         </varlistentry>
65
66         <varlistentry>
67                 <term>display charset</term>
68                 <listitem><para>This is the charset samba will use to print messages
69                 on your screen. It should generally be the same as the <command>unix charset</command>.
70                 </para></listitem>
71         </varlistentry>
72
73         <varlistentry>
74                 <term>dos charset</term>
75                 <listitem><para>This is the charset samba uses when communicating with 
76                 DOS and Windows 9x clients. It will talk unicode to all newer clients.
77                 The default depends on the charsets you have installed on your system.
78                 Run <command>testparm -v | grep "dos charset"</command> to see 
79                 what the default is on your system. 
80                 </para></listitem>
81         </varlistentry>
82 </variablelist>
83
84 <para>
85
86 </sect1>
87 </chapter>