Character Set for a Client Attachment

From InterBase

Go Up to Specifying Character Sets


When a client application, such as isql, connects to a database, it may have its own character set requirements. The server providing database access to the client does not know about these requirements unless the client specifies them. The client application specifies its character set requirement using the SET NAMES statement before it connects to the database.

SET NAMES specifies the character set the server should use when translating data from the database to the client application. Similarly, when the client sends data to the database, the server translates the data from the client’s character set to the database’s default character set (or the character set for an individual column if it differs from the database’s default character set).

For example, the following isql command specifies that isql is using the DOS437 character set. The next command connects to the europe database created above, in Specifying a Character Set for a Column in a Table:

SET NAMES DOS437;
CONNECT 'europe.ib' USER 'JAMES' PASSWORD 'U4EEAH';

For the complete syntax of SET NAMES, see SET NAMES (Reference). For the complete syntax of CONNECT, see CONNECT.

Advance To: