Progress
Internationalization Guide
Determining the Code Page
When Progress encounters character data, it often must determine the code page the data is encoded in. Similarly, a developer working with databases, files, and other application components often has to determine the code page a component uses to code character data. Table A–10 lists typical application components and for each, describes how Progress determines the code page and how the developer can determine the code page.
Table A–10: Determining the Code Page Application
Component How Progress
Determines the Code Page How a Developer Can
Determine the Code Page Client or Server Memory1 Progress checks the value of the -cpinternal startup parameter.The default value is ISO8859–1.The code-page name must appear in theconvmap.cp
file. A developer can check the setting of -cpinternal by using the SESSION:CPINTERNAL attribute. Database Progress reads the database’s metaschema field, _Db._Db-xl-name.By default, the code page for all new databases is the code page of the empty database. There is an empty database for each locale. A developer can connect to the database, then use the Data Administration utility, as described in Chapter 2, “Understanding Code Pages.”A developer can change the name in this field with the PROUTIL CONVCHAR utility.For an empty database, a developer can load a_tran.df
file that specifies a different name.A developer can use the DBCODEPAGE function, which displays the code page of the specified connected database. Graphical Monitor and Keyboard Progress checks the value of the -cpinternal startup parameter.The default value is ISO8859–1. A developer can check the setting of -cpinternal by using the SESSION:CPINTERNAL attribute. PROMSGS Files Progress reads an internal label placed in each PROMSGS file. A developer cannot change the value of this label, but can choose from a group of different PROMSGS files. INPUT FROM..., OUTPUT TO..., INPUT–OUTPUT... Progress checks the value of the -cpstream startup parameter. The default value is IBM850.The CONVERT and NO–CONVERT options override the current stream setting. To determine the setting of -cpstream, a developer can use the SESSION:CPSTREAM attribute. Character Terminals Progress checks the value of the -cpterm parameter, and if no value is specified for this parameter, Progress checks the value of the -cpstream parameter. The default value for -cpstream is IBM850. A developer can check the setting of -cpterm by using the SESSION:CPTERM attribute. Procedure (.p
) Files Progress checks the value of the -cpstream parameter.The default value is IBM850. A developer can check the setting of -cpstream by using the SESSION:CPSTREAM attribute. R-code (.r
) Files Progress checks the code page value written in the r-code. A developer can check the r-code setting of a particular file by using the RCODE–INFO:CODEPAGE attribute. The code page values specified with the R-code In Code Page (-cprcodein) and the R-code Out Code Page (-cprcodeout) startup parameters override the code page value written in the r-code.A developer can check the settings of -cprcodein and -cprcodeout by using the SESSION:CPRCODEIN and SESSION:CPRCODEOUT attributes, respectively.A developer can check the setting of -cpinternal by using the SESSION:CPINTERNAL attribute. Table Dump (.d
) and Data Definition (.df
) files Progress checks the value of the -cpstream parameter. The default value is IBM850.The Data Dictionary, however, implements its own rules when reading and writing these data and data definition files.When the Data Dictionary creates one of these files, it prompts you for a code page name. The Data Dictionary always appends a code-page name to a trailer in these files (either a name you specify or the name of the -cpstream code page).When the Data Dictionary reads one of these files, it checks for a code page in the trailer. If one is present, the Data Dictionary converts the data according to the name of the code page in the trailer. Otherwise, it uses the setting of -cpstream to determine the code-page name. A developer can check the setting of -cpstream by using the SESSION:CPSTREAM attribute.The PROUTIL BULKLOAD utility also checks these files for a trailer. If there is a trailer, the PROUTIL BULKLOAD utility converts the data according to the name in the trailer. Otherwise, it uses the setting of -cpstream to determine the code-page name.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |