Consultor Eletrônico



Kbase P27906: How to change a UTF-8 database to another codepage ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   27/06/2003
Status: Unverified

GOAL:

How to change a UTF-8 database to another codepage ?

FIX:

To make it possible to convert to a different codepage you first need to change the database collation. Follow these steps and most of all make sure you have a good backup of your database before performing these steps.

1) Get the desired collation (.df) file from $DLC/prolang/<lang>,
for example, $DLC/prolang/swe/swe8859.df:

> UPDATE DATABASE "?"
> COLLATION-TRANSLATION-VERSION 1.0-16
> CODEPAGE-NAME ISO8859-1
> COLLATION-NAME SWEDISH
> INTERNAL-EXTERNAL-TRAN-TABLE
> ...

2) Change the codepage name to UTF-8:

> UPDATE DATABASE "?"
> COLLATION-TRANSLATION-VERSION 1.0-16
> CODEPAGE-NAME UTF-8
> COLLATION-NAME SWEDISH
> INTERNAL-EXTERNAL-TRAN-TABLE

3) Load this .df file and run 'proutil <dbname> -C idxbuild all'.

4) Run 'proutil <dbname> -C convchar convert <codepage>'.

5) Load the proper collation .df file (the original $DLC/prolang/swe/swe8859.df, e.g.) and do an idxbuild again.