Multilingual Database Support with Legacy and OEM Encodings
If you choose to store text using a legacy or OEM code page, you will use the CHAR, VARCHAR, and LONGVARCHAR relational types. You may use wide character applications if you configure the access method to do conversion to your legacy code page.
When to Use a Legacy Code Page
Using a legacy code page is a compact and efficient way to store text data provided that the legacy code page defines a character set that meets the needs of your application.
Legacy Code Page Support in PSQL
The PSQL database engine assumes that CHAR data is encoded using the database code page. The access methods have configuration options that help ensure that this is the case.
Older applications that use OEM code pages for storage did not declare the database code page. You can continue to work with this situation so long as the application is careful to use the appropriate relational string functions.
Collation and Sorting with Legacy Code Pages
The default collation in PSQL is binary ordering of the encoded bytes. The declared database code page does not affect this default collation.
PSQL provides both alternate collating sequence (ACS) and international sorting rules (ISR) mechanisms for controlling collation. These may be declared on Btrieve indexes and on relational columns. PSQL will always use a particular ACS for the ASCII character set when using the CASE declaration on a relational column or the case-insensitive bit on a Btrieve index.
Access Methods for Legacy Code Pages
All PSQL access methods support byte-string text. Some assume that the database code page is the same as the application’s code page, and some allow configuration.
Migrating an Existing Database to a Different Legacy Code Page
Changing the code page of a database requires copying the data to a new database that uses the new code page. The copy must be done by your application. PSQL does not translate code pages within a transaction.
If your database metadata use characters that require translation, those changes must be made when creating the schema of the new database. Table names are a common example of this type of metadata.