Try OpenEdge Now
skip to main content
Database Administration
Reference : PROUTIL Utility : PROUTIL CONVFILE qualifier
 

PROUTIL CONVFILE qualifier

Converts a text file from one character set to any other character set.

Syntax

proutil -C convfile {file-name convert using table-name
                    |file-name[ analyze ]}

Parameters

file-name
Specifies the name of the file you are converting or analyzing.
convert using table-name
Specifies the name of the file containing the conversion table. This file requires the following format:

# optional comment lines begin with the # character
SOURCE source-codepage-name
TARGET target-codepage-name
/*000-015*/000  001 002 003 004 005 006 007 008 009 010 011 012 013 014
/*016-031*/016  017 018 019 020 021 022 023 024 025 026 027 028 029 030
/*032-047*/032  033 034 035 036 037 038 039 040 041 042 043 044 045 046
                                       .
                                       .
                                       .
/*240-255*/240  241 242 243 244 245 246 247 248 249 250 251 252 253 254
where source-codepage-name is the name of the character set of file-name, and target-codepage-name is the name of the desired character set for file-name.
The conversion table is composed of 256 cells, numbering from 0 to 255. You can build your own conversion table, or you can use default tables stored in the prolang sub-directory of your installation if appropriate. The tables in the prolang directory are as follows:
*1250-852.dat — Converts from code page 1250 to IBM code page 852
*1250-il2.dat — Converts from code page 1250 to iso8859-2
*1254-857.dat — Converts from IBM code page 1254 to code page 857
*852-1250.dat — Converts from IBM code page 852 to code page 1250
*852-il2.dat — Converts from IBM code page 852 to iso8859-2
*857-1254.dat — Converts from IBM code page 857 to code page 1254
*cn850.dat — Converts iso8859-1 to IBM code page 850
*cn8859-1.dat — Converts IBM code page 850 to iso8859-1
*cnnull.dat — Performs no conversion; you might want to use this file as a template file for creating new conversion tables
*il2-1250.dat — Converts from iso8859-2 to code page 1250
*il2-852.dat — Converts from iso8859-2 to IBM code page 852
If you create your own conversion table, you must understand how PROUTIL CONVFILE uses the table. For each character in file-name, PROUTIL CONVFILE uses the character's numeric value to index it against the table. When it locates the corresponding cell, PROUTIL CONVFILE replaces the character in the text file with the character value in that cell. Therefore, you must make a copy of the text file before you run the PROUTIL CONVFILE utility, because if the utility does not completely convert the file, the data in it is corrupted.
analyze
Displays the number of occurrences of each character in file-name. You might be able to determine the character set of file-name by comparing the output of this option against different code pages.