Ignore:
Timestamp:
Mar 1, 2010, 3:05:48 PM (15 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3.x to 3.3.11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/docs/htmldocs/Samba3-HOWTO/unicode.html

    r368 r411  
    1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 30. Unicode/Charsets</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Official Samba 3.3.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="integrate-ms-networks.html" title="Chapter 29. Integrating MS Windows Networks with Samba"><link rel="next" href="Backup.html" title="Chapter 31. Backup Techniques"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Unicode/Charsets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="integrate-ms-networks.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="Backup.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 30. Unicode/Charsets"><div class="titlepage"><div><div><h2 class="title"><a name="unicode"></a>Chapter 30. Unicode/Charsets</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">TAKAHASHI</span> <span class="surname">Motonobu</span></h3><span class="contrib">Japanese character support</span> <div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:monyo@home.monyo.com">monyo@home.monyo.com</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">25 March 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="unicode.html#id2675949">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2676001">What Are Charsets and Unicode?</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2676134">Samba and Charsets</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2676270">Conversion from Old Names</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2676302">Japanese Charsets</a></span></dt><dd><dl><dt><span class="sect2"><a href="unicode.html#id2676441">Basic Parameter Setting</a></span></dt><dt><span class="sect2"><a href="unicode.html#id2677082">Individual Implementations</a></span></dt><dt><span class="sect2"><a href="unicode.html#id2677205">Migration from Samba-2.2 Series</a></span></dt></dl></dd><dt><span class="sect1"><a href="unicode.html#id2677352">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="unicode.html#id2677357">CP850.so Can't Be Found</a></span></dt></dl></dd></dl></div><div class="sect1" title="Features and Benefits"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2675949"></a>Features and Benefits</h2></div></div></div><p>
    2 <a class="indexterm" name="id2675957"></a>
     1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 30. Unicode/Charsets</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="The Official Samba 3.3.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="integrate-ms-networks.html" title="Chapter 29. Integrating MS Windows Networks with Samba"><link rel="next" href="Backup.html" title="Chapter 31. Backup Techniques"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Unicode/Charsets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="integrate-ms-networks.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="Backup.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="unicode"></a>Chapter 30. Unicode/Charsets</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">TAKAHASHI</span> <span class="surname">Motonobu</span></h3><span class="contrib">Japanese character support</span> <div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:monyo@home.monyo.com">monyo@home.monyo.com</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">25 March 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="unicode.html#id2669864">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2669916">What Are Charsets and Unicode?</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2670049">Samba and Charsets</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2670185">Conversion from Old Names</a></span></dt><dt><span class="sect1"><a href="unicode.html#id2670216">Japanese Charsets</a></span></dt><dd><dl><dt><span class="sect2"><a href="unicode.html#id2670356">Basic Parameter Setting</a></span></dt><dt><span class="sect2"><a href="unicode.html#id2670996">Individual Implementations</a></span></dt><dt><span class="sect2"><a href="unicode.html#id2671120">Migration from Samba-2.2 Series</a></span></dt></dl></dd><dt><span class="sect1"><a href="unicode.html#id2671266">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="unicode.html#id2671272">CP850.so Can't Be Found</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2669864"></a>Features and Benefits</h2></div></div></div><p>
     2<a class="indexterm" name="id2669872"></a>
    33Every industry eventually matures. One of the great areas of maturation is in
    44the focus that has been given over the past decade to make it possible for anyone
     
    1212is deserving of special mention.
    1313</p><p>
    14 <a class="indexterm" name="id2675986"></a>
     14<a class="indexterm" name="id2669900"></a>
    1515Samba-2.x supported a single locale through a mechanism called
    1616<span class="emphasis"><em>codepages</em></span>. Samba-3 is destined to become a truly transglobal
    1717file- and printer-sharing platform.
    18 </p></div><div class="sect1" title="What Are Charsets and Unicode?"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2676001"></a>What Are Charsets and Unicode?</h2></div></div></div><p>
    19 <a class="indexterm" name="id2676009"></a>
     18</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2669916"></a>What Are Charsets and Unicode?</h2></div></div></div><p>
     19<a class="indexterm" name="id2669924"></a>
    2020Computers communicate in numbers. In texts, each number is
    2121translated to a corresponding letter. The meaning that will be assigned
     
    2323</em></span> that is used.
    2424</p><p>
    25 <a class="indexterm" name="id2676026"></a>
    26 <a class="indexterm" name="id2676033"></a>
     25<a class="indexterm" name="id2669941"></a>
     26<a class="indexterm" name="id2669948"></a>
    2727A charset can be seen as a table that is used to translate numbers to
    2828letters. Not all computers use the same charset (there are charsets
     
    3232256 characters. Using this mode of encoding, each character takes exactly one byte.
    3333</p><p>
    34 <a class="indexterm" name="id2676051"></a>
    35 <a class="indexterm" name="id2676058"></a>
     34<a class="indexterm" name="id2669966"></a>
     35<a class="indexterm" name="id2669973"></a>
    3636There are also charsets that support extended characters, but those need at least
    3737twice as much storage space as does ASCII encoding. Such charsets can contain
     
    4040more then one byte to store one character.
    4141</p><p>
    42 <a class="indexterm" name="id2676080"></a>
     42<a class="indexterm" name="id2669994"></a>
    4343One standardized multibyte charset encoding scheme is known as
    4444<a class="ulink" href="http://www.unicode.org/" target="_top">unicode</a>.  A big advantage of using a
     
    4646computers use the same charset when they are communicating.
    4747</p><p>
    48 <a class="indexterm" name="id2676100"></a>
    49 <a class="indexterm" name="id2676107"></a>
    50 <a class="indexterm" name="id2676114"></a>
     48<a class="indexterm" name="id2670015"></a>
     49<a class="indexterm" name="id2670022"></a>
     50<a class="indexterm" name="id2670028"></a>
    5151Old Windows clients use single-byte charsets, named
    5252<em class="parameter"><code>codepages</code></em>, by Microsoft. However, there is no support for
     
    5454have to make sure you are using the same charset when talking to an older client.
    5555Newer clients (Windows NT, 200x, XP) talk Unicode over the wire.
    56 </p></div><div class="sect1" title="Samba and Charsets"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2676134"></a>Samba and Charsets</h2></div></div></div><p>
    57 <a class="indexterm" name="id2676142"></a>
    58 <a class="indexterm" name="id2676149"></a>
     56</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2670049"></a>Samba and Charsets</h2></div></div></div><p>
     57<a class="indexterm" name="id2670057"></a>
     58<a class="indexterm" name="id2670064"></a>
    5959As of Samba-3, Samba can (and will) talk Unicode over the wire. Internally,
    6060Samba knows of three kinds of character sets:
    6161</p><div class="variablelist"><dl><dt><span class="term"><a class="link" href="smb.conf.5.html#UNIXCHARSET" target="_top">unix charset</a></span></dt><dd><p>
    62 <a class="indexterm" name="id2676181"></a>
    63 <a class="indexterm" name="id2676187"></a>
     62<a class="indexterm" name="id2670096"></a>
     63<a class="indexterm" name="id2670102"></a>
    6464                This is the charset used internally by your operating system.
    6565                The default is <code class="constant">UTF-8</code>, which is fine for most
     
    7474                Run <code class="literal">testparm -v | grep "dos charset"</code> to see
    7575                what the default is on your system.
    76                 </p></dd></dl></div></div><div class="sect1" title="Conversion from Old Names"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2676270"></a>Conversion from Old Names</h2></div></div></div><p>
    77 <a class="indexterm" name="id2676278"></a>
     76                </p></dd></dl></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2670185"></a>Conversion from Old Names</h2></div></div></div><p>
     77<a class="indexterm" name="id2670193"></a>
    7878Because previous Samba versions did not do any charset conversion,
    7979characters in filenames are usually not correct in the UNIX charset but only
     
    8181</p><p>Bjoern Jacke has written a utility named <a class="ulink" href="http://j3e.de/linux/convmv/" target="_top">convmv</a>
    8282that can convert whole directory structures to different charsets with one single command.
    83 </p></div><div class="sect1" title="Japanese Charsets"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2676302"></a>Japanese Charsets</h2></div></div></div><p>
     83</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2670216"></a>Japanese Charsets</h2></div></div></div><p>
    8484Setting up Japanese charsets is quite difficult. This is mainly because:
    85 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
    86 <a class="indexterm" name="id2676317"></a>
     85</p><div class="itemizedlist"><ul type="disc"><li><p>
     86<a class="indexterm" name="id2670232"></a>
    8787                The Windows character set is extended from the original legacy Japanese
    8888                standard (JIS X 0208) and is not standardized. This means that the strictly
    8989                standardized implementation cannot support the full Windows character set.
    90         </p></li><li class="listitem"><p>
    91 <a class="indexterm" name="id2676332"></a>
    92 <a class="indexterm" name="id2676339"></a>
    93 <a class="indexterm" name="id2676346"></a>
    94 <a class="indexterm" name="id2676353"></a>
    95 <a class="indexterm" name="id2676359"></a>
     90        </p></li><li><p>
     91<a class="indexterm" name="id2670247"></a>
     92<a class="indexterm" name="id2670254"></a>
     93<a class="indexterm" name="id2670260"></a>
     94<a class="indexterm" name="id2670267"></a>
     95<a class="indexterm" name="id2670274"></a>
    9696                Mainly for historical reasons, there are several encoding methods in
    9797                Japanese, which are not fully compatible with each other. There are
     
    102102                UNIXes that can't use Japanese filenames.  Some implementations of the
    103103                EUC-JP series can't support the full Windows character set.
    104         </p></li><li class="listitem"><p>There are some code conversion tables between Unicode and legacy
     104        </p></li><li><p>There are some code conversion tables between Unicode and legacy
    105105                Japanese character sets. One is compatible with Windows, another one
    106106                is based on the reference of the Unicode consortium, and others are
     
    108108                define any conversion tables between Unicode and legacy character
    109109                sets, so there cannot be standard one.
    110         </p></li><li class="listitem"><p>The character set and conversion tables available in iconv() depend
     110        </p></li><li><p>The character set and conversion tables available in iconv() depend
    111111                on the iconv library that is available. Next to that, the Japanese locale
    112112                names may be different on different systems.  This means that the value of
    113113                the charset parameters depends on the implementation of iconv() you are using.
    114114                </p><p>
    115 <a class="indexterm" name="id2676409"></a>
    116 <a class="indexterm" name="id2676416"></a>
    117 <a class="indexterm" name="id2676422"></a>
    118 <a class="indexterm" name="id2676429"></a>
     115<a class="indexterm" name="id2670324"></a>
     116<a class="indexterm" name="id2670330"></a>
     117<a class="indexterm" name="id2670337"></a>
     118<a class="indexterm" name="id2670344"></a>
    119119                Though 2-byte fixed UCS-2 encoding is used in Windows internally,
    120120                Shift_JIS series encoding is usually used in Japanese environments
    121121                as ASCII encoding is in English environments.
    122         </p></li></ul></div><div class="sect2" title="Basic Parameter Setting"><div class="titlepage"><div><div><h3 class="title"><a name="id2676441"></a>Basic Parameter Setting</h3></div></div></div><p>
    123 <a class="indexterm" name="id2676448"></a>
     122        </p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2670356"></a>Basic Parameter Setting</h3></div></div></div><p>
     123<a class="indexterm" name="id2670363"></a>
    124124        The <a class="link" href="smb.conf.5.html#DOSCHARSET" target="_top">dos charset</a> and
    125125        <a class="link" href="smb.conf.5.html#DISPLAYCHARSET" target="_top">display charset</a>
     
    128128        but sometimes has a different name.
    129129        </p><p>
    130 <a class="indexterm" name="id2676485"></a>
    131 <a class="indexterm" name="id2676491"></a>
    132 <a class="indexterm" name="id2676498"></a>
     130<a class="indexterm" name="id2670400"></a>
     131<a class="indexterm" name="id2670406"></a>
     132<a class="indexterm" name="id2670413"></a>
    133133        The <a class="link" href="smb.conf.5.html#UNIXCHARSET" target="_top">unix charset</a> can be either Shift_JIS series,
    134134        EUC-JP series, or UTF-8. UTF-8 is always available, but the availability of other locales
     
    138138        value of the <a class="link" href="smb.conf.5.html#UNIXCHARSET" target="_top">unix charset</a>
    139139        parameter by using the vfs_cap module, which does the same thing as
    140         setting <span class="quote">&#8220;<span class="quote">coding system = CAP</span>&#8221;</span> in the Samba 2.2 series.
     140        setting &#8220;<span class="quote">coding system = CAP</span>&#8221; in the Samba 2.2 series.
    141141        </p><p>
    142142        Where to set <a class="link" href="smb.conf.5.html#UNIXCHARSET" target="_top">unix charset</a>
     
    147147                        used as a standard on Japanese Windows. In the case of <code class="constant">Shift_JIS</code>,
    148148                        for example, if a Japanese filename consists of 0x8ba4 and 0x974c
    149                         (a 4-bytes Japanese character string meaning <span class="quote">&#8220;<span class="quote">share</span>&#8221;</span>) and <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span>
     149                        (a 4-bytes Japanese character string meaning &#8220;<span class="quote">share</span>&#8221;) and &#8220;<span class="quote">.txt</span>&#8221;
    150150                        is written from Windows on Samba, the filename on UNIX becomes
    151                         0x8ba4, 0x974c, <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span> (an 8-byte BINARY string), same as Windows.
     151                        0x8ba4, 0x974c, &#8220;<span class="quote">.txt</span>&#8221; (an 8-byte BINARY string), same as Windows.
    152152                        </p><p>Since Shift_JIS series is usually used on some commercial-based
    153153                        UNIXes; hp-ux and AIX as the Japanese locale (however, it is also possible
     
    160160                        may be displayed, and some commands that cannot handle non-ASCII
    161161                        filenames may be aborted during parsing filenames. Especially, there
    162                         may be <span class="quote">&#8220;<span class="quote">\ (0x5c)</span>&#8221;</span> in filenames, which need to be handled carefully.
     162                        may be &#8220;<span class="quote">\ (0x5c)</span>&#8221; in filenames, which need to be handled carefully.
    163163                        It is best to not touch filenames written from Windows on UNIX.
    164164                        </p><p>
     
    167167                        with Shift_JIS.
    168168                        </p></dd><dt><span class="term">EUC-JP series</span></dt><dd><p>
    169 <a class="indexterm" name="id2676632"></a>
    170 <a class="indexterm" name="id2676639"></a>
     169<a class="indexterm" name="id2670547"></a>
     170<a class="indexterm" name="id2670554"></a>
    171171                        EUC-JP series means a locale that is equivalent to the industry
    172172                        standard called EUC-JP, widely used in Japanese UNIX (although EUC
    173173                        contains specifications for languages other than Japanese, such as
    174174                        EUC-KR). In the case of EUC-JP series, for example, if a Japanese
    175                         filename consists of 0x8ba4 and 0x974c and <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span> is written from
     175                        filename consists of 0x8ba4 and 0x974c and &#8220;<span class="quote">.txt</span>&#8221; is written from
    176176                        Windows on Samba, the filename on UNIX becomes 0xb6a6, 0xcdad,
    177                         <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span> (an 8-byte BINARY string).
    178                         </p><p>
    179 <a class="indexterm" name="id2676664"></a>
    180 <a class="indexterm" name="id2676671"></a>
    181 <a class="indexterm" name="id2676678"></a>
    182 <a class="indexterm" name="id2676684"></a>
    183 <a class="indexterm" name="id2676691"></a>
    184 <a class="indexterm" name="id2676698"></a>
    185 <a class="indexterm" name="id2676705"></a>
    186 <a class="indexterm" name="id2676712"></a>
    187 <a class="indexterm" name="id2676718"></a>
    188 <a class="indexterm" name="id2676725"></a>
     177                        &#8220;<span class="quote">.txt</span>&#8221; (an 8-byte BINARY string).
     178                        </p><p>
     179<a class="indexterm" name="id2670579"></a>
     180<a class="indexterm" name="id2670585"></a>
     181<a class="indexterm" name="id2670592"></a>
     182<a class="indexterm" name="id2670599"></a>
     183<a class="indexterm" name="id2670606"></a>
     184<a class="indexterm" name="id2670613"></a>
     185<a class="indexterm" name="id2670619"></a>
     186<a class="indexterm" name="id2670626"></a>
     187<a class="indexterm" name="id2670633"></a>
     188<a class="indexterm" name="id2670640"></a>
    189189                        Since EUC-JP is usually used on open source UNIX, Linux, and FreeBSD, and on commercial-based UNIX, Solaris,
    190190                        IRIX, and Tru64 UNIX as Japanese locale (however, it is also possible on Solaris to use Shift_JIS and UTF-8,
     
    195195                        </p><p>
    196196                        Although there is no character that needs to be carefully treated
    197                         like <span class="quote">&#8220;<span class="quote">\ (0x5c)</span>&#8221;</span>, broken filenames may be displayed and some
     197                        like &#8220;<span class="quote">\ (0x5c)</span>&#8221;, broken filenames may be displayed and some
    198198                        commands that cannot handle non-ASCII filenames may be aborted
    199199                        during parsing filenames.
    200200                        </p><p>
    201 <a class="indexterm" name="id2676758"></a>
     201<a class="indexterm" name="id2670673"></a>
    202202                        Moreover, if you built Samba using differently installed libiconv,
    203203                        the eucJP-ms locale included in libiconv and EUC-JP series locale
     
    210210                        or 2 bytes is used to express Japanese, basically a byte length of a UTF-8 string the length of the UTF-8
    211211                        string is 1.5 times that of the original Shift_JIS string. In the case of UTF-8, for example, if a Japanese
    212                         filename consists of 0x8ba4 and 0x974c, and <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span> is written from Windows on Samba, the filename
    213                         on UNIX becomes 0xe585, 0xb1e6, 0x9c89, <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span> (a 10-byte BINARY string).
     212                        filename consists of 0x8ba4 and 0x974c, and &#8220;<span class="quote">.txt</span>&#8221; is written from Windows on Samba, the filename
     213                        on UNIX becomes 0xe585, 0xb1e6, 0x9c89, &#8220;<span class="quote">.txt</span>&#8221; (a 10-byte BINARY string).
    214214                        </p><p>
    215215                        For systems where iconv() is not available or where iconv()'s locales
     
    220220                        Some broken filenames may be displayed, and some commands that
    221221                        cannot handle non-ASCII filenames may be aborted during parsing
    222                         filenames. Especially, there may be <span class="quote">&#8220;<span class="quote">\ (0x5c)</span>&#8221;</span> in filenames, which
     222                        filenames. Especially, there may be &#8220;<span class="quote">\ (0x5c)</span>&#8221; in filenames, which
    223223                        must be handled carefully, so you had better not touch filenames
    224224                        written from Windows on UNIX.
    225225                        </p><p>
    226 <a class="indexterm" name="id2676832"></a>
    227 <a class="indexterm" name="id2676838"></a>
    228 <a class="indexterm" name="id2676845"></a>
     226<a class="indexterm" name="id2670746"></a>
     227<a class="indexterm" name="id2670753"></a>
     228<a class="indexterm" name="id2670760"></a>
    229229                        In addition, although it is not directly concerned with Samba, since
    230230                        there is a delicate difference between the iconv() function, which is
     
    234234                        of the limitations involved in the process.
    235235                        </p><p>
    236 <a class="indexterm" name="id2676862"></a>
     236<a class="indexterm" name="id2670777"></a>
    237237                        Although Mac OS X uses UTF-8 as its encoding method for filenames,
    238238                        it uses an extended UTF-8 specification that Samba cannot handle, so
    239239                        UTF-8 locale is not available for Mac OS X.
    240240                        </p></dd><dt><span class="term">Shift_JIS series + vfs_cap (CAP encoding)</span></dt><dd><p>
    241 <a class="indexterm" name="id2676883"></a>
    242 <a class="indexterm" name="id2676890"></a>
    243 <a class="indexterm" name="id2676896"></a>
     241<a class="indexterm" name="id2670798"></a>
     242<a class="indexterm" name="id2670804"></a>
     243<a class="indexterm" name="id2670811"></a>
    244244                        CAP encoding means a specification used in CAP and NetAtalk, file
    245245                        server software for Macintosh. In the case of CAP encoding, for
    246246                        example, if a Japanese filename consists of 0x8ba4 and 0x974c, and
    247                         <span class="quote">&#8220;<span class="quote">.txt</span>&#8221;</span> is written from Windows on Samba, the filename on UNIX
    248                         becomes <span class="quote">&#8220;<span class="quote">:8b:a4:97L.txt</span>&#8221;</span> (a 14 bytes ASCII string).
     247                        &#8220;<span class="quote">.txt</span>&#8221; is written from Windows on Samba, the filename on UNIX
     248                        becomes &#8220;<span class="quote">:8b:a4:97L.txt</span>&#8221; (a 14 bytes ASCII string).
    249249                        </p><p>
    250250                        For CAP encoding, a byte that cannot be expressed as an ASCII
    251                         character (0x80 or above) is encoded in an <span class="quote">&#8220;<span class="quote">:xx</span>&#8221;</span> form. You need to take
    252                         care of containing a <span class="quote">&#8220;<span class="quote">\(0x5c)</span>&#8221;</span> in a filename, but filenames are not
     251                        character (0x80 or above) is encoded in an &#8220;<span class="quote">:xx</span>&#8221; form. You need to take
     252                        care of containing a &#8220;<span class="quote">\(0x5c)</span>&#8221; in a filename, but filenames are not
    253253                        broken in a system that cannot handle non-ASCII filenames.
    254254                        </p><p>
     
    270270                        To use CAP encoding on Samba-3, you should use the unix charset parameter and VFS
    271271                        as in <a class="link" href="unicode.html#vfscap-intl" title="Example 30.1. VFS CAP">the VFS CAP smb.conf file</a>.
    272                         </p><div class="example"><a name="vfscap-intl"></a><p class="title"><b>Example 30.1. VFS CAP</b></p><div class="example-contents"><table border="0" summary="Simple list" class="simplelist"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td># the locale name "CP932" may be different</td></tr><tr><td><a class="indexterm" name="id2676996"></a><em class="parameter"><code>dos charset = CP932</code></em></td></tr><tr><td><a class="indexterm" name="id2677007"></a><em class="parameter"><code>unix charset = CP932</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[cap-share]</code></em></td></tr><tr><td><a class="indexterm" name="id2677028"></a><em class="parameter"><code>vfs option = cap</code></em></td></tr></table></div></div><br class="example-break"><p>
    273 <a class="indexterm" name="id2677043"></a>
    274 <a class="indexterm" name="id2677050"></a>
    275 <a class="indexterm" name="id2677057"></a>
    276 <a class="indexterm" name="id2677064"></a>
     272                        </p><div class="example"><a name="vfscap-intl"></a><p class="title"><b>Example 30.1. VFS CAP</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td># the locale name "CP932" may be different</td></tr><tr><td><a class="indexterm" name="id2670910"></a><em class="parameter"><code>dos charset = CP932</code></em></td></tr><tr><td><a class="indexterm" name="id2670922"></a><em class="parameter"><code>unix charset = CP932</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[cap-share]</code></em></td></tr><tr><td><a class="indexterm" name="id2670943"></a><em class="parameter"><code>vfs option = cap</code></em></td></tr></table></div></div><br class="example-break"><p>
     273<a class="indexterm" name="id2670958"></a>
     274<a class="indexterm" name="id2670964"></a>
     275<a class="indexterm" name="id2670971"></a>
     276<a class="indexterm" name="id2670978"></a>
    277277                        You should set CP932 if using GNU libiconv for unix charset. With this setting,
    278                         filenames in the <span class="quote">&#8220;<span class="quote">cap-share</span>&#8221;</span> share are written with CAP encoding.
    279                         </p></dd></dl></div></div><div class="sect2" title="Individual Implementations"><div class="titlepage"><div><div><h3 class="title"><a name="id2677082"></a>Individual Implementations</h3></div></div></div><p>
     278                        filenames in the &#8220;<span class="quote">cap-share</span>&#8221; share are written with CAP encoding.
     279                        </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2670996"></a>Individual Implementations</h3></div></div></div><p>
    280280Here is some additional information regarding individual implementations:
    281281</p><div class="variablelist"><dl><dt><span class="term">GNU libiconv</span></dt><dd><p>
     
    300300                        </p><p>
    301301                        Using the above glibc, these setting are available:
    302                         </p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id2677158"></a><em class="parameter"><code>dos charset = CP932</code></em></td></tr><tr><td><a class="indexterm" name="id2677170"></a><em class="parameter"><code>unix charset = CP932 / eucJP-ms / UTF-8</code></em></td></tr><tr><td><a class="indexterm" name="id2677182"></a><em class="parameter"><code>display charset = CP932</code></em></td></tr></table><p>
     302                        </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2671073"></a><em class="parameter"><code>dos charset = CP932</code></em></td></tr><tr><td><a class="indexterm" name="id2671085"></a><em class="parameter"><code>unix charset = CP932 / eucJP-ms / UTF-8</code></em></td></tr><tr><td><a class="indexterm" name="id2671097"></a><em class="parameter"><code>display charset = CP932</code></em></td></tr></table><p>
    303303                        </p><p>
    304304                        Other Japanese locales (for example, Shift_JIS and EUC-JP) should not
    305305                        be used because of the lack of the compatibility with Windows.
    306                         </p></dd></dl></div></div><div class="sect2" title="Migration from Samba-2.2 Series"><div class="titlepage"><div><div><h3 class="title"><a name="id2677205"></a>Migration from Samba-2.2 Series</h3></div></div></div><p>
    307 Prior to Samba-2.2 series, the <span class="quote">&#8220;<span class="quote">coding system</span>&#8221;</span> parameter was used. The default codepage in Samba
     306                        </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2671120"></a>Migration from Samba-2.2 Series</h3></div></div></div><p>
     307Prior to Samba-2.2 series, the &#8220;<span class="quote">coding system</span>&#8221; parameter was used. The default codepage in Samba
    3083082.x was code page 850. In the Samba-3 series this has been replaced with the <a class="link" href="smb.conf.5.html#UNIXCHARSET" target="_top">unix charset</a> parameter.  <a class="link" href="unicode.html#japancharsets" title="Table 30.1. Japanese Character Sets in Samba-2.2 and Samba-3">Japanese Character Sets in Samba-2.2 and Samba-3</a>
    309309shows the mapping table when migrating from the Samba-2.2 series to Samba-3.
    310 </p><div class="table"><a name="japancharsets"></a><p class="title"><b>Table 30.1. Japanese Character Sets in Samba-2.2 and Samba-3</b></p><div class="table-contents"><table summary="Japanese Character Sets in Samba-2.2 and Samba-3" border="1"><colgroup><col align="center"><col align="center"></colgroup><thead><tr><th align="center">Samba-2.2 Coding System</th><th align="center">Samba-3 unix charset</th></tr></thead><tbody><tr><td align="center">SJIS</td><td align="center">Shift_JIS series</td></tr><tr><td align="center">EUC</td><td align="center">EUC-JP series</td></tr><tr><td align="center">EUC3<sup>[<a name="id2677301" href="#ftn.id2677301" class="footnote">a</a>]</sup></td><td align="center">EUC-JP series</td></tr><tr><td align="center">CAP</td><td align="center">Shift_JIS series + VFS</td></tr><tr><td align="center">HEX</td><td align="center">currently none</td></tr><tr><td align="center">UTF8</td><td align="center">UTF-8</td></tr><tr><td align="center">UTF8-Mac<sup>[<a name="id2677332" href="#ftn.id2677332" class="footnote">b</a>]</sup></td><td align="center">currently none</td></tr><tr><td align="center">others</td><td align="center">none</td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id2677301" href="#id2677301" class="para">a</a>] </sup>Only exists in Japanese Samba version</p></div><div class="footnote"><p><sup>[<a name="ftn.id2677332" href="#id2677332" class="para">b</a>] </sup>Only exists in Japanese Samba version</p></div></td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="sect1" title="Common Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2677352"></a>Common Errors</h2></div></div></div><div class="sect2" title="CP850.so Can't Be Found"><div class="titlepage"><div><div><h3 class="title"><a name="id2677357"></a>CP850.so Can't Be Found</h3></div></div></div><p><span class="quote">&#8220;<span class="quote">Samba is complaining about a missing <code class="filename">CP850.so</code> file.</span>&#8221;</span></p><p>
     310</p><div class="table"><a name="japancharsets"></a><p class="title"><b>Table 30.1. Japanese Character Sets in Samba-2.2 and Samba-3</b></p><div class="table-contents"><table summary="Japanese Character Sets in Samba-2.2 and Samba-3" border="1"><colgroup><col align="center"><col align="center"></colgroup><thead><tr><th align="center">Samba-2.2 Coding System</th><th align="center">Samba-3 unix charset</th></tr></thead><tbody><tr><td align="center">SJIS</td><td align="center">Shift_JIS series</td></tr><tr><td align="center">EUC</td><td align="center">EUC-JP series</td></tr><tr><td align="center">EUC3<sup>[<a name="id2671215" href="#ftn.id2671215" class="footnote">a</a>]</sup></td><td align="center">EUC-JP series</td></tr><tr><td align="center">CAP</td><td align="center">Shift_JIS series + VFS</td></tr><tr><td align="center">HEX</td><td align="center">currently none</td></tr><tr><td align="center">UTF8</td><td align="center">UTF-8</td></tr><tr><td align="center">UTF8-Mac<sup>[<a name="id2671246" href="#ftn.id2671246" class="footnote">b</a>]</sup></td><td align="center">currently none</td></tr><tr><td align="center">others</td><td align="center">none</td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a name="ftn.id2671215" href="#id2671215" class="para">a</a>] </sup>Only exists in Japanese Samba version</p></div><div class="footnote"><p><sup>[<a name="ftn.id2671246" href="#id2671246" class="para">b</a>] </sup>Only exists in Japanese Samba version</p></div></td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2671266"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2671272"></a>CP850.so Can't Be Found</h3></div></div></div><p>&#8220;<span class="quote">Samba is complaining about a missing <code class="filename">CP850.so</code> file.</span>&#8221;</p><p>
    311311                CP850 is the default <a class="link" href="smb.conf.5.html#DOSCHARSET" target="_top">dos charset</a>.
    312312                The <a class="link" href="smb.conf.5.html#DOSCHARSET" target="_top">dos charset</a> is used to convert data to the codepage used by your DOS clients.
Note: See TracChangeset for help on using the changeset viewer.