Match Samba 2.2, and make ACB_NORMAL the default ACB value.
[tprouty/samba.git] / docs / htmldocs / unicode.html
index 89a70cbee80790e00c268ae14c6b7ee0640f04e5..01cc974f5c0b9b4f0d3e8f1e19adc7853062b21b 100644 (file)
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML
-><HEAD
-><TITLE
->Unicode/Charsets</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
-REL="HOME"
-TITLE="SAMBA Project Documentation"
-HREF="samba-howto-collection.html"><LINK
-REL="UP"
-TITLE="Advanced Configuration"
-HREF="optional.html"><LINK
-REL="PREVIOUS"
-TITLE="Securing Samba"
-HREF="securing-samba.html"><LINK
-REL="NEXT"
-TITLE="Appendixes"
-HREF="appendixes.html"></HEAD
-><BODY
-CLASS="CHAPTER"
-BGCOLOR="#FFFFFF"
-TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
-><DIV
-CLASS="NAVHEADER"
-><TABLE
-SUMMARY="Header navigation table"
-WIDTH="100%"
-BORDER="0"
-CELLPADDING="0"
-CELLSPACING="0"
-><TR
-><TH
-COLSPAN="3"
-ALIGN="center"
->SAMBA Project Documentation</TH
-></TR
-><TR
-><TD
-WIDTH="10%"
-ALIGN="left"
-VALIGN="bottom"
-><A
-HREF="securing-samba.html"
-ACCESSKEY="P"
->Prev</A
-></TD
-><TD
-WIDTH="80%"
-ALIGN="center"
-VALIGN="bottom"
-></TD
-><TD
-WIDTH="10%"
-ALIGN="right"
-VALIGN="bottom"
-><A
-HREF="appendixes.html"
-ACCESSKEY="N"
->Next</A
-></TD
-></TR
-></TABLE
-><HR
-ALIGN="LEFT"
-WIDTH="100%"></DIV
-><DIV
-CLASS="CHAPTER"
-><H1
-><A
-NAME="UNICODE"
-></A
->Chapter 26. Unicode/Charsets</H1
-><DIV
-CLASS="TOC"
-><DL
-><DT
-><B
->Table of Contents</B
-></DT
-><DT
->26.1. <A
-HREF="unicode.html#AEN4127"
->What are charsets and unicode?</A
-></DT
-><DT
->26.2. <A
-HREF="unicode.html#AEN4136"
->Samba and charsets</A
-></DT
-><DT
->26.3. <A
-HREF="unicode.html#AEN4155"
->Conversion from old names</A
-></DT
-></DL
-></DIV
-><DIV
-CLASS="SECT1"
-><H1
-CLASS="SECT1"
-><A
-NAME="AEN4127"
->26.1. What are charsets and unicode?</A
-></H1
-><P
->Computers communicate in numbers. In texts, each number will be 
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 27. Unicode/Charsets</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="integrate-ms-networks.html" title="Chapter 26. Integrating MS Windows Networks with Samba"><link rel="next" href="Backup.html" title="Chapter 28. Samba 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 27. 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 27. 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><tt class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</tt></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><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">TAKAHASHI</span> <span class="surname">Motonobu</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:monyo@home.monyo.com">monyo@home.monyo.com</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate">25 March 2003</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="unicode.html#id2963374">Features and Benefits</a></dt><dt><a href="unicode.html#id2963419">What Are Charsets and Unicode?</a></dt><dt><a href="unicode.html#id2963499">Samba and Charsets</a></dt><dt><a href="unicode.html#id2963627">Conversion from Old Names</a></dt><dt><a href="unicode.html#id2963643">Japanese Charsets</a></dt><dt><a href="unicode.html#id2963781">Common Errors</a></dt><dd><dl><dt><a href="unicode.html#id2963788">CP850.so Can't Be Found</a></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963374"></a>Features and Benefits</h2></div></div><div></div></div><p>
+Every industry eventually matures. One of the great areas of maturation is in
+the focus that has been given over the past decade to make it possible for anyone
+anywhere to use a computer. It has not always been that way, in fact, not so long
+ago it was common for software to be written for exclusive use in the country of
+origin.
+</p><p>
+Of all the effort that has been brought to bear on providing native language support
+for all computer users, the efforts of the <ulink url="http://www.openi18n.org/">Openi18n organization</ulink> is deserving of
+special mention.
+</p><p>
+Samba-2.x supported a single locale through a mechanism called 
+<span class="emphasis"><em>codepages</em></span>. Samba-3 is destined to become a truly trans-global
+file and printer-sharing platform.
+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963419"></a>What Are Charsets and Unicode?</h2></div></div><div></div></div><p>
+Computers communicate in numbers. In texts, each number will be 
 translated to a corresponding letter. The meaning that will be assigned 
-to a certain number depends on the <SPAN
-CLASS="emphasis"
-><I
-CLASS="EMPHASIS"
->character set(charset)</I
-></SPAN
-> that is used. 
+to a certain number depends on the <span class="emphasis"><em>character set (charset)
+</em></span> that is used. 
+</p><p>
 A charset can be seen as a table that is used to translate numbers to 
 letters. Not all computers use the same charset (there are charsets 
-with German umlauts, Japanese characters, etc). Usually a charset contains 
+with German umlauts, Japanese characters, and so on). Usually a charset contains 
 256 characters, which means that storing a character with it takes 
-exactly one byte. </P
-><P
->There are also charsets that support even more characters, 
-but those need twice(or even more) as much storage space. These 
-charsets can contain <B
-CLASS="COMMAND"
->256 * 256 = 65536</B
-> characters, which
-is more then all possible characters one could think of. They are called 
-multibyte charsets (because they use more then one byte to 
-store one character). </P
-><P
->A standardised multibyte charset is unicode, info available at 
-<A
-HREF="http://www.unicode.org/"
-TARGET="_top"
->www.unicode.org</A
->. 
-Big advantage of using a multibyte charset is that you only need one; no 
-need to make sure two computers use the same charset when they are 
-communicating.</P
-><P
->Old windows clients used to use single-byte charsets, named 
-'codepages' by microsoft. However, there is no support for 
-negotiating the charset to be used in the smb protocol. Thus, you 
-have to make sure you are using the same charset when talking to an old client.
-Newer clients (Windows NT, 2K, XP) talk unicode over the wire.</P
-></DIV
-><DIV
-CLASS="SECT1"
-><H1
-CLASS="SECT1"
-><A
-NAME="AEN4136"
->26.2. Samba and charsets</A
-></H1
-><P
->As of samba 3.0, samba can (and will) talk unicode over the wire. Internally, 
-samba knows of three kinds of character sets: </P
-><P
-></P
-><DIV
-CLASS="VARIABLELIST"
-><DL
-><DT
->unix charset</DT
-><DD
-><P
->              This is the charset used internally by your operating system. 
-               The default is <CODE
-CLASS="CONSTANT"
->ASCII</CODE
->, which is fine for most 
-               systems.
-               </P
-></DD
-><DT
->display charset</DT
-><DD
-><P
->This is the charset samba will use to print messages
-               on your screen. It should generally be the same as the <B
-CLASS="COMMAND"
->unix charset</B
->.
-               </P
-></DD
-><DT
->dos charset</DT
-><DD
-><P
->This is the charset samba uses when communicating with 
-               DOS and Windows 9x clients. It will talk unicode to all newer clients.
+exactly one byte. </p><p>
+There are also charsets that support even more characters, 
+but those need twice as much storage space (or more). These 
+charsets can contain <b class="command">256 * 256 = 65536</b> characters, which
+is more than all possible characters one could think of. They are called 
+multibyte charsets because they use more then one byte to 
+store one character. 
+</p><p>
+A standardized multibyte charset is <ulink url="http://www.unicode.org/">unicode</ulink>.
+A big advantage of using a multibyte charset is that you only need one; there 
+is no need to make sure two computers use the same charset when they are 
+communicating.
+</p><p>Old Windows clients use single-byte charsets, named 
+<i class="parameter"><tt>codepages</tt></i>, by Microsoft. However, there is no support for 
+negotiating the charset to be used in the SMB/CIFS protocol. Thus, you 
+have to make sure you are using the same charset when talking to an older client.
+Newer clients (Windows NT, 200x, XP) talk unicode over the wire.
+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963499"></a>Samba and Charsets</h2></div></div><div></div></div><p>
+As of Samba-3.0, Samba can (and will) talk unicode over the wire. Internally, 
+Samba knows of three kinds of character sets: 
+</p><div class="variablelist"><dl><dt><span class="term"><a class="indexterm" name="id2963521"></a><i class="parameter"><tt>unix charset</tt></i></span></dt><dd><p>
+               This is the charset used internally by your operating system. 
+               The default is <tt class="constant">UTF-8</tt>, which is fine for most 
+               systems, which covers all characters in all languages. The default in previous Samba releases was <tt class="constant">ASCII</tt>. 
+               </p></dd><dt><span class="term"><a class="indexterm" name="id2963558"></a><i class="parameter"><tt>display charset</tt></i></span></dt><dd><p>This is the charset Samba will use to print messages
+               on your screen. It should generally be the same as the <i class="parameter"><tt>unix charset</tt></i>.
+               </p></dd><dt><span class="term"><a class="indexterm" name="id2963592"></a><i class="parameter"><tt>dos charset</tt></i></span></dt><dd><p>This is the charset Samba uses when communicating with 
+               DOS and Windows 9x/Me clients. It will talk unicode to all newer clients.
                The default depends on the charsets you have installed on your system.
-               Run <B
-CLASS="COMMAND"
->testparm -v | grep "dos charset"</B
-> to see 
+               Run <b class="command">testparm -v | grep "dos charset"</b> to see 
                what the default is on your system. 
-               </P
-></DD
-></DL
-></DIV
-></DIV
-><DIV
-CLASS="SECT1"
-><H1
-CLASS="SECT1"
-><A
-NAME="AEN4155"
->26.3. Conversion from old names</A
-></H1
-><P
->Because previous samba versions did not do any charset conversion, 
-characters in filenames are usually not correct in the unix charset but only 
-for the local charset used by the DOS/Windows clients.</P
-><P
->The following script from Steve Langasek converts all 
-filenames from CP850 to the iso8859-15 charset.</P
-><P
-><SAMP
-CLASS="PROMPT"
->#</SAMP
-><KBD
-CLASS="USERINPUT"
->find <VAR
-CLASS="REPLACEABLE"
->/path/to/share</VAR
-> -type f -exec bash -c 'CP="{}"; ISO=`echo -n "$CP" | iconv -f cp850 \
-  -t iso8859-15`; if [ "$CP" != "$ISO" ]; then mv "$CP" "$ISO"; fi' \;</KBD
-></P
-></DIV
-></DIV
-><DIV
-CLASS="NAVFOOTER"
-><HR
-ALIGN="LEFT"
-WIDTH="100%"><TABLE
-SUMMARY="Footer navigation table"
-WIDTH="100%"
-BORDER="0"
-CELLPADDING="0"
-CELLSPACING="0"
-><TR
-><TD
-WIDTH="33%"
-ALIGN="left"
-VALIGN="top"
-><A
-HREF="securing-samba.html"
-ACCESSKEY="P"
->Prev</A
-></TD
-><TD
-WIDTH="34%"
-ALIGN="center"
-VALIGN="top"
-><A
-HREF="samba-howto-collection.html"
-ACCESSKEY="H"
->Home</A
-></TD
-><TD
-WIDTH="33%"
-ALIGN="right"
-VALIGN="top"
-><A
-HREF="appendixes.html"
-ACCESSKEY="N"
->Next</A
-></TD
-></TR
-><TR
-><TD
-WIDTH="33%"
-ALIGN="left"
-VALIGN="top"
->Securing Samba</TD
-><TD
-WIDTH="34%"
-ALIGN="center"
-VALIGN="top"
-><A
-HREF="optional.html"
-ACCESSKEY="U"
->Up</A
-></TD
-><TD
-WIDTH="33%"
-ALIGN="right"
-VALIGN="top"
->Appendixes</TD
-></TR
-></TABLE
-></DIV
-></BODY
-></HTML
->
\ No newline at end of file
+               </p></dd></dl></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963627"></a>Conversion from Old Names</h2></div></div><div></div></div><p>Because previous Samba versions did not do any charset conversion, 
+characters in filenames are usually not correct in the UNIX charset but only 
+for the local charset used by the DOS/Windows clients.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963643"></a>Japanese Charsets</h2></div></div><div></div></div><p>Samba does not work correctly with Japanese charsets yet. Here are
+points of attention when setting it up:</p><div class="itemizedlist"><ul type="disc"><li><p>You should set <a class="indexterm" name="id2963664"></a><i class="parameter"><tt>mangling method</tt></i> = hash</p></li><li><p>There are various iconv() implementations around and not
+       all of  them work equally well. glibc2's iconv() has a critical problem
+       in CP932. libiconv-1.8 works with CP932 but still has some problems and
+       does not  work with EUC-JP.</p></li><li><p>You should set <a class="indexterm" name="id2963693"></a><i class="parameter"><tt>dos charset</tt></i> = CP932, not
+       Shift_JIS, SJIS.</p></li><li><p>Currently only <a class="indexterm" name="id2963713"></a><i class="parameter"><tt>UNIX charset</tt></i> = CP932
+       will work (but still has some problems...) because of iconv() issues.
+       <a class="indexterm" name="id2963729"></a><i class="parameter"><tt>UNIX charset</tt></i> = EUC-JP does not work well because of
+       iconv() issues.</p></li><li><p>Currently Samba-3.0 does not support <a class="indexterm" name="id2963749"></a><i class="parameter"><tt>UNIX charset</tt></i> = UTF8-MAC/CAP/HEX/JIS*.</p></li></ul></div><p>More information (in Japanese) is available at: <ulink url="http://www.atmarkit.co.jp/flinux/special/samba3/samba3a.html">http://www.atmarkit.co.jp/flinux/special/samba3/samba3a.html</ulink>.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963781"></a>Common Errors</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963788"></a>CP850.so Can't Be Found</h3></div></div><div></div></div><p>&#8220;<span class="quote">Samba is complaining about a missing <tt class="filename">CP850.so</tt> file.</span>&#8221;</p><p><span class="emphasis"><em>Answer:</em></span> CP850 is the default <a class="indexterm" name="id2963814"></a><i class="parameter"><tt>dos charset</tt></i>.
+               The <a class="indexterm" name="id2963828"></a><i class="parameter"><tt>dos charset</tt></i> is used to convert data to the codepage used by your dos clients.
+               If you do not have any dos clients, you can safely ignore this message. </p><p>CP850 should be supported by your local iconv implementation. Make sure you have all the required packages installed.
+               If you compiled Samba from source, make sure to configure found iconv.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="integrate-ms-networks.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Backup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 26. Integrating MS Windows Networks with Samba </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 28. Samba Backup Techniques</td></tr></table></div></body></html>