Starting with Samba 3.0, Samba supports Unicode "on the wire," requiring no additional effort on your part to support filenames and other text containing characters in international character sets. 11.3.1 Internationalization OptionsSamba 2.2.x has a limited ability to speak foreign tongues : if you need to support filenames containing characters that aren't in standard ASCII, some options that can help you are shown in Table 11-3. Table 11-3. Internationalization options
11.3.1.1 client code pageThe character sets on Windows platforms hark back to the original concept of a code page . These code pages are used by DOS and Windows clients to determine rules for mapping lowercase letters to uppercase letters . Samba can be instructed to use a variety of code pages through the use of the global client code page option to match the corresponding code page in use on the client. This option loads a code page definition file and can take the values specified in Table 11-4. Table 11-4. Valid code pages with Samba 2.0
You can set the client code page as follows : [global] client code page = 852 The default value of this option is 850, for MS-DOS Latin 1. You can use the make_smbcodepage tool that comes with Samba (by default in /usr/local/samba/bin ) to create your own SMB code pages, in the event that those listed earlier are not sufficient. 11.3.1.2 character setThe global character set option can be used to convert filenames offered through a DOS code page (see the previous section, Section 11.3.1.1) to equivalents that can be represented by Unix character sets other than those in the United States. For example, if you want to convert the Western European MS-DOS character set on the client to a Western European Unix character set on the server, you can use the following in your configuration file: [global] client code page = 850 character set = ISO8859-1 Note that you must include a client code page option to specify the character set from which you are converting. The valid character sets (and their matching code pages) that Samba accepts are listed in Table 11-5. Table 11-5. Valid character sets
Normally, the character set option is disabled completely. 11.3.1.3 coding systemThe coding system option is similar to the character set option. However, its purpose is to determine how to convert a Japanese Shift JIS code page into an appropriate Unix character set. To use this option, the client code page option described previously must be set to page 932 . The valid coding systems that Samba accepts are listed in Table 11-6. Table 11-6. Valid coding-system parameters
11.3.1.4 valid charsThe valid chars option can be used to add individual characters to a code page. You can use this option as follows: valid chars = valid chars = 0450:0420 0x0A20:0x0A00 valid chars = A:a Each character in the list specified should be separated by spaces. If there is a colon between two characters or a numerical equivalent, the data to the left of the colon is considered an uppercase character, while the data to the right is considered the lowercase character. You can represent characters both by literals (if you can type them) and by octal, hexadecimal, or decimal Unicode equivalents. If you use this option, it must be listed after the client code page to which you wish to add the character. |