Kbase 20446: Character Client Print Problems from 4GL
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/11/2008 |
|
SUMMARY:
This solution explains why sometimes the printing of specific characters from a 4GL Character Client session results in incorrect printer output.
Yet the characters look correct from within the Character Client session and the print can be directed to a text file and then viewed correctly with the "type" command at the DOS prompt.
EXPLANATION:
The reason for this problem is that the printer is using a different code page to the Character Client session. The printer code page is determined by Windows.
To resolve the problem, start the Character Client session with -cpstream set to the current DOS code page setting and -cpprint set to the printer code page. This forces output conversion to the same code page as the printer.
To recreate the problem:
With a printer that uses a Windows code page (1252 or
iso8859-1) and a DOS code page of IBM850, you should
start a Character Client session with:
_progres.exe -cpinternal ibm850 -cpstream ibm850
Here, -cpprint defaults to the -cpstream setting of
IBM850. If you run the following code, it displays
correctly to the screen and the text file, but the
printer output is incorrect:
/* umlaut.p */
DEF VAR umlaut AS CHAR INITIAL "äüöß".
DISPLAY umlaut.
OUTPUT TO umlaut.txt.
DISPLAY umlaut.
OUTPUT CLOSE.
OUTPUT TO printer.
DISPLAY umlaut.
OUTPUT CLOSE.
If you run the same code with a session startup of:
_progres.exe -cpinternal ibm850 -cpstream ibm850 -
cpprint iso8859-1
the display, text file output and printer output is correct.