community.borland.com

Article #25319: How to specify a foreign character set for each client attachment

Problem:
Given an environment with mixed languages, how do you specify
 a different character set for each client attachment to the database.  
This is a big problem when the application has already been 
developed and is being deployed to non-native language 
environments.

Solution:
The information in this article applies to:

* InterBase 4.x
* InterBase 5.x

There are a few options to workaround this problem:
(note:   re-compiling the application may be required).

1)Add an EXEC SQL SET NAMES to the application.  To make it
 dynamic, you could set an environment variable with the :var
 information.

2)Compile the application with the -charset option to gpre. 
 For example:   gpre -charset ISO8859_1 myapp.e

3)Manually or programmatically (for example, using a awk script)
 modify the .c program so that the following is added to the dpb
 for each attachment statement:
isc_dpb_lc_ctype,"" 

For example, the above additional line for the French character 
set would be:
isc_dpb_lc_ctype, "ISO8859_1" 

Wishlist request to have a client-side configuration file and 
an new Interbase_ctype variable to specify the character set
 information is added for future releases of InterBase.

Last Modified: 17-OCT-00