Pervasive logo

Prev Getting Started with Pervasive.SQL (Server edition) Next

Internationalization with the Linux Client


This section discusses encoding issues and the level of support for internationalization when using the Linux client.

Btrieve

ODBC

Here is a summary of ODBC behavior with respect to character encoding.

The following scenarios describe the various cases. In each case, it is assumed that the application itself does not do any conversion and uses the encoding that is native for the machine.

LinuxJ machine using EUC-JP client to connect to a Win32 SHIFT-JIS server

The server requires that everything is received as SHIFT-JIS. The client requires that server send everything as EUC-JP.

To accomplish this, the client dsn used to connect to the given database needs to be set up like the following example:

[dbclient] 
 
Driver=/usr/local/psql/lib/odbcci.so 
 
Description=Pervasive ODBC Client Interface: JPN-2000SERVER:1583/dbclient 
 
ServerDSN=DEMODATA 
 
ServerName=JPN-2000SERVER:1583 
 
TranslationDLL=/usr/local/psql/lib/libxlate.so.8 
 
TranslationOption=90000932 

The TranslationDLL line specifies the translation library that the ODBC client interface should use.

The TranslationOption line specifies that the translation needs to occur from 9000 (represents EUC-JP) to 0932 (represents SHIFT-JIS).

Using this example, all data coming from the client will be translated into SHIFT-JIS before it gets to the server, and to EUC-JP before the data is received by the client.

LinuxJ machine using EUC-JP client to connect to a LinuxJ EUC-JP server

Using this configuration, no changes to the dsn description are needed. Use the dsn as it was created by the dsnadd utility.

LinuxJ machine using EUC-JP client to connect to a LinuxJ EUC-JP server, but you want to use SHIFT-JIS encoding

This situation is possible if you have a SHIFT-JIS database on a Win32 engine, and you want to move all the files to the Linux EUC-JP server. In this case, the database resides on a EUC-JP Linux machine, but all the data inside the DDF files and data files are in SHIFT-JIS.

In this case, your dsn should resemble the following:

[dbclient] 
 
Driver=/usr/local/psql/lib/odbcci.so 
 
Description=Pervasive ODBC Client Interface: JPN-2000SERVER:1583/dbclient 
 
ServerDSN=DEMODATA 
 
ServerName=JPN-2000SERVER:1583 
 
TranslationDLL=/usr/local/psql/lib/libxlate.so.8 
 
TranslationOption=90000932 
 
CodePageConvert=932 

The last line specifies that even though the server uses EUC-JP encoding, it should treat the data on the server as SHIFT-JIS.

DTI

The Distributed Tuning Interface (DTI) requires that you use SHIFT-JIS encoding.


Prev
Creating a Client DSN with the Linux Client
Contents
Up
Check for Revisions
Next
Setting Up Web-based Data Access on Linux