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
- When using the Btrieve API, you must provide file names and paths in EUC-JP or another encoding used in your application. The client converts this to UTF8 when passing the request to the server, and then the server converts the UTF8 encoding to the local encoding.
- The butil utility does not currently interpret Japanese file names.
ODBC
Here is a summary of ODBC behavior with respect to character encoding.
- When using ODBC, Win32 encoding is expected to be SHIFT-JIS. LinuxJ encoding is expected to be in EUC-JP.
- RedHat 9 uses UTF8 as the default encoding. You should convert this encoding to be EUC-JP.
- When using LinuxJ, a client can connect to another EUC-JP server (for example, locally), or to a Win32 SHIFT-JIS client. It is also possible to connect to a database encoded in SHIFT-JIS but located on a EUC-JP LinuxJ server.
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=90000932The
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=932The 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 |