Kbase 21430: Data From Different Code Page Displayed As Question Marks
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/11/2008 |
|
Status: Verified
GOAL:
How to correctly display data from a different code page in the Character SQL Explorer tool.
FACT(s) (Environment):
Progress 9.x
FIX:
When data from a Database of a different code page is displayed as "??" rather than displaying in the correct character set there has been a problem with the code-page conversion; in particular, conversion from Unicode to the machine locale when the SQL Explorer displays the data. This conversion is performed by Java itself.
Consider, for example, a Database with Chinese Big-5 data, running on a UNIX machine with ISO8859-1 as the default code page. If SQL Explorer has been started with:
sqlexp -char -db [dbname] -S [port] -H [hostname]
and a select statement run, the data displays as question marks.
By default, a Java application like SQL Explorer converts its Unicode data to the host machine's default locales code page. Since the host machine in this case is an English one with ISO8859-1 as the default code page, the character SQL Explorer always tries to convert the Traditional Chinese Unicode data into ISO8859-1 through the Java default converter without knowing the real target code page, in this case, Big-5. Since there is no way to make the conversion the data displays question marks.
In order to solve these kind of problems, the Progress SQL Explorer has a command-line startup parameter that allows users to specify an external code page which might be different from the default one. This argument is, -codepage.
An example of how this can be used is:
sqlexp -char -db [dbname] -S [port] -H [hostname] -codepage Big5