Using the internationalized server


he internationalized version of the Netscape Enterprise Server contains special features tailored for the non-U.S. environment. These features include a choice of user-interface language (Japanese, French, or German) and a choice of search engines that allow you to use text search on a variety of languages.

General information

The following information covers the international considerations for general server capabilities.

Installing the server

When you install the server, you choose what user-interface language to use, as well as what search engines to install.

For information on installing the international version of the server, see the README file.

Entering 8-bit text

If you want to type 8-bit data into the Server Manager or the administration server forms, you need to be aware of the issues in this section.

File or directory names

If a file or directory name is to appear in a URL, it cannot contain 8-bit or multi-byte characters.

LDAP users and groups

For email addresses, use only those characters permitted in RFC 822
(ftp://ds.internic.net/rfc/rfc822.txt). User ID and password information must be stored in ASCII.

If you use a local database, you can enter 8-bit and multi-byte characters, but you should standardize on one character set. If you use more than one character set in the same database, it can cause display and search problems.

If you must use 8-bit or multi-byte characters in your directory database, you should store them in UTF-8 for future compatibility with the Netscape Directory Server version 3.x. To make sure you enter characters in the correct format, use a UTF-8 form-capable client (such as Netscape Communicator) to input 8-bit or double-byte data.

If you let users access their own user and group information, they will need to use a UTF-8 form-capable client.

Using the accept language header

When clients contact a server using HTTP 1.1, they can send header information that describes the various languages they accept. You can configure your server to parse this language information.

For example, suppose this feature is set to on, and a client configured to send the accept language header sends it with the value en,fr. Now suppose that the client requests the following URL:

http://www.someplace.com/somepage.html 
The server first looks for:

http://www.someplace.com/en/somepage.html
If it does not find that, it looks for:

http://www.someplace.com/fr/somepage.html
If that is not available either, and a ClientLanguage (call it xx) is defined in the magnus.conf file, the server tries:

http://www.someplace.com/xx/somepage.html
If none of these exist, the server tries:

http://www.someplace.com/somepage.html
For information about configuring the server to parse the accept language header, see "Parsing the accept language header" on page 59.

Language settings in configuration files

The following directives in the magnus.conf file affect languages:
International settings in magnus.conf

File

Directive

Values

Description

magnus.conf

ClientLanguage

en, fr, de, ja

Specifies the language in which client messages, such as "Not Found" or "Access denied" are to be expressed. This value is used to identify a directory containing ns-https.db.

magnus.conf

DefaultLanguage

en, fr, de, ja

Specifies the language used if a resource cannot be found for the client language or the administration language.

magnus.conf

AcceptLanguage

on, off

Enables or disables the Accept language header parsing.

The following directives in the ns-admin.conf file affect languages:
International settings in ns-admin.conf

File

Directive

Values

Description

ns-admin.conf

ClientLanguage

en, fr, de, ja

If the client does not send an accept language header, ClientLanguage defines the language of the Directory Server User Information and Password pages. The two-letter value code is used to find the directory containing ns-admin.db.

ns-admin.conf

AdminLanguage

en, fr, de, ja

Sets the language used for administrative pages that are accessed through the administration server.

ns-admin.conf

DefaultLanguage

en, fr, de, ja

The language used if a value cannot be found for the client or admin languages.

Server-side JavaScript information

When you use server-side JavaScript with the international version of the server, you have additional things to consider when compiling applications and using databases. For example, you can specify the language of the JavaScript application one of two ways: using the compiler, or using the HTML <META> tag.

Specifying the character set for the compiler

For the international version, the server-side JavaScript compiler (jsac) has a -l option called charSet. This option specifies the character set being used in the input HTML files. The value for charSet is one of the following character set names.
Valid values for charSet

Language

Value for charSet

Western European

iso-8859-1

Central European

iso-8859-2

Cyrillic

iso-8859-5

Japanese

iso-2022-jp, x-sjis, x-euc-jp

Korean

iso-2022-kr, x-euc-kr

Simplified Chinese

x-gb2312

Traditional Chinese

x-big5, x-euc-ch

Greek

iso-8859-7

Turkish

iso-8859-9

Usage
To use this option, use the following format:
jsac [-cdv] [-l charSet] -o binaryFile [-i] inputFile1 [-i] inputFile2 
... 
jsac [-cdv] -o binaryFile -f includeFile 
jsac -h 
Options
The following table shows the options for the compiler.
Options for the jsac compiler

Option

Usage

-c

Check only; do not generate binaryFile

-v

Enable verbose output

-d

Enable debug output

-o

Name of binaryFile (output file).

-i

Name of inputFile (use if the input filename starts with a switch character)

-f

Name of includeFile (has input filenames, separated by white space)

-l

Name of charSet (for example, iso-8859-1, x-sjis, euc-kr)

-h

Display this help

The possible filename extensions are summarized in the following table:
File extensions

Extension

File type

.html or .htm

HTML source file (may include JavaScript)

.js

JavaScript source file

.web

Binary output file

When you specify the language using the compiler option, you can only specify one language. If you want to specify multiple languages, you can use the <META> tag in the individual files.

Specifying the character set with the <META> tag

You can also use the <META> tag to specify the character set information. For example, if you put the following statement into the header (between <HEAD> and </HEAD>) in a JavaScript program, the server-side JavaScript compiler (jsac) considers the file to be written in x-sjis.

<META HTTP-EQUIV="Content-Type" CONTENT="test/html; CHARSET=x-sjis"> 
If the character set specified in the <META> tag is different from the character set specified by the compiler's charSet option, the character set specified by the compiler option is used.

Using server-side JavaScript with Oracle's Japanese database

To use server-side JavaScript with Oracle's Japanese database, follow these overall steps. Details for each step are in the following sections.

  1. Install Oracle and set up your environment.
  2. Verify the connection.
  3. Verify the language setup.

Installing Oracle and setting up your environment

You must first install the Japanese Oracle database. For instructions, see the documentation that came with your database. Next, you must set up your environment variables using the following information. Note that the environment variable syntax assumes C Shell.

Server-side JavaScript library:

Environment variables for Oracle:

Environment variable for NLS (National Language Support) in Oracle:

Environment variable for the path:

Restart the web server from the command line.

Verifying the connection

  1. At the Application Manager, select and run dbadmin.
  2. Click Connect to Database Server.
  3. Enter the following information in the window, and click Connect. If your server identifier, user ID, or password is different from these default values, enter your actual values here.
    Field

    Value

    Server Type

    ORACLE

    Server Identifier

    WG73

    User ID

    system

    Password

    manager

    Database


Unless you see an error indicating otherwise, you are now connected.

Verifying the language setup

Use the videoapp sample application to verify the language setup.

  1. If your ORACLE installation has a server identifier, user ID, or password that is different from the default values shown in the previous table, be sure to specify the actual values in the start.htm file at the following line:
    	project.sharedConnections.pool = 
    new DbPool("ORACLE","WG73", "system", "manager", "", 2, false)
  2. Run the build script in the directory to recompile the JavaScript code.
  3. At the Application Manager, select and run vidoeapp.
  4. Click Add New Customer and enter data in the character set you specified.
  5. Click Home to go back to the videoapp home page, and then click Save Changes.
  6. Click Delete a Customer.
  7. Check to see if the data you entered appears in the table. If the data appears in the database in the correct language, you've set up the languages correctly.

Putting the Oracle client and database server on separate hosts

To put the Oracle client (with server-side JavaScript database service) and the Oracle database server on separate hosts, follow these steps:

  1. On the client side, define the SERVER SID alias to refer to the server in tnsnames.ora.
  2. Set the TWO_TASK environment variable to the SERVER SID alias defined in the tsnames.ora file.
    For example:

    	setenv TWO_TASK SERVER SID alias
    
  3. Set the NLS_LANG environment variable to the correct client language and character set information.
  4. Using the sample application videoapp, edit the start.htm file as shown below. (In this example, assume that the SERVER SID alias is remoteDB.)
    project.sharedConnections.pool = new DbPool("ORACLE","remoteDB", "system", "manager", "", 2, false)

  5. Click Add New Customer and enter data in the character set you specified.
  6. Click Home to go back to the videoapp home page, and then click Save Changes.
  7. Click Delete a Customer.
  8. Check to see if the data you entered appears in the table. If the data appears in the database correctly, you've configured your system properly.

Search information

Search capabilities are supported for the following languages:

You choose which search engines to install when you install the international version of the server.

International search and auto catalog

If your server contains documents in various character set encodings, the search collections and/or auto catalog for the documents will inherit the same encodings as the originals. To view documents in different character set encodings, users must change the character set encoding for their browsers. In addition, since the text search and auto catalog features work with one character set encoding at a time, you might receive inaccurate results when using those features. Netscape recommends using one specific character set for all documents.

Searching in Chinese, Japanese, and Korean

The following information is specific to searching in Japanese, Korean, and Chinese.

Query operators

This release supports the following query operators for Japanese, Korean and Chinese languages:
Query operators for Japanese

Operator

J/C/K Character

AND

Yes

CONTAINS

No

ENDS

Yes

MATCHES

Yes

NEAR

Yes

NEAR/N

Yes

NOT

Yes

OR

Yes

PHRASE

Yes

STARTS

Yes

STEM

English only

SUBSTRING

Yes

WILDCARD *

Yes

WILDCARD ?

Yes

WILDCARD {}

No

WILDCARD []

No

WILDCARD ^

No

WILDCARD -

No

WORD

Yes

Document formats

This release supports the following document formats for the Japanese, Korean, and Chinese languages:

Searching in Japanese

The following sections give additional information about searching in the Japanese character set.

Document codes
This release supports the following document codes for the Japanese language:

Search words
This release supports the following search words:

The search engine translates half-width katakana to full-width katakana, and translates full-width ascii-string to half-width ascii-string. Users can use full-width and half-width as the same characters.

This release also supports phrase and sentence search.


Copyright 1997 Netscape Communications Corporation. All rights reserved.