Locale

Description

Specifies the locale name that you want the Sybase Open Client software to use when connecting to a Sybase Adaptive Server Enterprise database or a database accessed through DirectConnect in PowerBuilder.

NoteWhen to specify Locale You must specify the Locale parameter before connecting to the database.

Applies to

Syntax

Locale='locale_name'

Default

The default locale defined in your LOCALES.DAT file

Usage

Locales Locales are stored as entries in a file named LOCALES.DAT. The LOCALES.DAT file contains information about the languages and character sets you are using with the Sybase Open Client software. The Sybase Open Client installation places the LOCALES.DAT file in the $SYBASE\LOCALES directory.

An entry in the LOCALES.DAT file has the following format:

locale=locale_name, language_name, character_set_name

For example:

locale=default, us_english, cp850

locale=enu, us_english, cp850

locale=fra, french, cp850

Why set Locale parameter Setting a value for the Locale parameter lets you use a locale other than the default locale when accessing an Adaptive Server Enterprise or DirectConnect database. If you do not set a value for Locale, Sybase Open Client uses the default locale defined in your LOCALES.DAT file.

What happens When you specify a value for the Locale parameter, PowerBuilder:

Overriding Locale parameter If you have previously set a value for the Locale parameter that includes settings for the language and character set you want to use, you can override the language or character set values by specifying new values for the Language or CharSet parameter and reconnecting to the database.

Unicode data access PowerBuilder can access Unicode data in an ASE 12.5 or later Unicode database or in Unicode columns in ASE 12.5 or later. PowerBuilder converts between double-byte character set (DBCS) data and Unicode automatically, provided that the Locale parameter is set with DBCS values. For example, the Locale parameter should be set to chs or cht.

Examples

Example 1

To set the locale to fra:

What happens Setting the Locale parameter to fra has the same effect as individually setting both the Language and CharSet parameters as follows:

Language='French'

CharSet='cp850'

See also