From 293421f3c64a2adff7dc15f7ad3adb6120c9fd16 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Sep 2003 15:05:22 +0000 Subject: syncing up docs, examples, & packaging from 3.0 (This used to be commit dd1348c566b4700ea01bd89639e2d3330c878167) --- docs/htmldocs/unicode.html | 78 ++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 38 deletions(-) (limited to 'docs/htmldocs/unicode.html') diff --git a/docs/htmldocs/unicode.html b/docs/htmldocs/unicode.html index a4f568576d..01cc974f5c 100644 --- a/docs/htmldocs/unicode.html +++ b/docs/htmldocs/unicode.html @@ -1,4 +1,4 @@ -Chapter 27. Unicode/Charsets

Chapter 27. Unicode/Charsets

Jelmer R. Vernooij

The Samba Team

TAKAHASHI Motonobu

25 March 2003

Features and Benefits

+Chapter 27. Unicode/Charsets

Chapter 27. Unicode/Charsets

Jelmer R. Vernooij

The Samba Team

John H. Terpstra

Samba Team

TAKAHASHI Motonobu

25 March 2003

Features and Benefits

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 @@ -6,62 +6,64 @@ ago it was common for software to be written for exclusive use in the country of origin.

Of all the effort that has been brought to bear on providing native language support -for all computer users, the efforts of the Openi18n organisation is deserving of +for all computer users, the efforts of the Openi18n organization is deserving of special mention.

Samba-2.x supported a single locale through a mechanism called codepages. Samba-3 is destined to become a truly trans-global -file and printer sharing platform. -

What are charsets and unicode?

+file and printer-sharing platform. +

What Are Charsets and Unicode?

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 character set(charset) +to a certain number depends on the character set (charset) that is used. +

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.

There are also charsets that support even more characters, -but those need twice(or even more) as much storage space. These +but those need twice as much storage space (or more). These charsets can contain 256 * 256 = 65536 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). +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.

- A standardised multibyte charset is unicode. +A standardized multibyte charset is unicode. 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. -

Old windows clients 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 +

Old Windows clients use single-byte charsets, named +codepages, 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, 2K, XP) talk unicode over the wire. -

Samba and charsets

-As of samba 3.0, samba can (and will) talk unicode over the wire. Internally, -samba knows of three kinds of character sets: -

unix charset

+Newer clients (Windows NT, 200x, XP) talk unicode over the wire. +

Samba and Charsets

+As of Samba-3.0, Samba can (and will) talk unicode over the wire. Internally, +Samba knows of three kinds of character sets: +

unix charset

This is the charset used internally by your operating system. The default is UTF-8, which is fine for most - systems. The default in previous samba releases was ASCII. -

display charset

This is the charset samba will use to print messages - on your screen. It should generally be the same as the unix charset. -

dos charset

This is the charset samba uses when communicating with - DOS and Windows 9x clients. It will talk unicode to all newer clients. + systems, which covers all characters in all languages. The default in previous Samba releases was ASCII. +

display charset

This is the charset Samba will use to print messages + on your screen. It should generally be the same as the unix charset. +

dos charset

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 testparm -v | grep "dos charset" to see + Run testparm -v | grep "dos charset" to see what the default is on your system. -

Conversion from old names

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.

Bjoern Jacke has written a utility named convm that can convert whole directory - structures to different charsets with one single command. -

Japanese charsets

Samba doesn't work correctly with Japanese charsets yet. Here are -points of attention when setting it up:

  • You should set mangling method = hash

  • 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.

  • You should set dos charset = CP932, not -Shift_JIS, SJIS...

  • Currently only unix charset = CP932 -will work (but still has some problems...) because of iconv() issues. -unix charset = EUC-JP doesn't work well because of -iconv() issues.

  • Currently Samba 3.0 does not support unix charset = UTF8-MAC/CAP/HEX/JIS*

More information (in Japanese) is available at: http://www.atmarkit.co.jp/flinux/special/samba3/samba3a.html.

Common errors

CP850.so can't be found

Samba is complaining about a missing CP850.so file”.

CP850 is the default dos charset. The dos charset is used to convert data to the codepage used by your dos clients. If you don't have any dos clients, you can safely ignore this message.

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 configure found iconv.

+

Conversion from Old Names

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.

Japanese Charsets

Samba does not work correctly with Japanese charsets yet. Here are +points of attention when setting it up:

  • You should set mangling method = hash

  • 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.

  • You should set dos charset = CP932, not + Shift_JIS, SJIS.

  • Currently only UNIX charset = CP932 + will work (but still has some problems...) because of iconv() issues. + UNIX charset = EUC-JP does not work well because of + iconv() issues.

  • Currently Samba-3.0 does not support UNIX charset = UTF8-MAC/CAP/HEX/JIS*.

More information (in Japanese) is available at: http://www.atmarkit.co.jp/flinux/special/samba3/samba3a.html.

Common Errors

CP850.so Can't Be Found

Samba is complaining about a missing CP850.so file.

Answer: CP850 is the default dos charset. + The dos charset 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.

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.

-- cgit