Consultor Eletrônico



Kbase 15346: Using extended ascii values, differences between V6 and V7
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Using extended ascii values, differences between V6 and V7

This kbase entry is pertinent to situations where an application
outputs characters in the extended ascii range, and the user sees
different results in version 7 than in version 6.

With version 6 the assumption was that all the user's data and
all processing would be on one machine. Version 7 is much more
geared toward client/server applications which could involve
multiple machines and terminal types. Consequently, in version 6
we used a single code page and did not do any code page conversion,
where in version 7, we use multiple code pages. -cpinternal is the
internal code page Progress uses is memory. -cpstream is the code
page used for stream I/O. -cpterm is the code page used for character
terminals (if no code page is specified here -cpstream is used).
Version 7 automatically does conversions between these code pages
allowing Progress to be very flexible in terms of the machines and
terminal types it supports.

The use of multiple code pages affects a number of areas in the 4GL.
Since -cpinternal is the code page used for data in memory, the data
used by the client which the 4GL sees, functions like ASC, CHR and
LASTKEY are affected by this. -cpinternal also affects the code page
used by GUI terminals.

-cpstream affects operations such as INPUT FROM, OUTPUT TO,
INPUT/OUTPUT THROUGH, stdin and stdout for batch jobs and character
mode terminals. Again, the code page for character terminals can also
be overridden with the -cpterm parameter.

It's important to note here that the first 127 values are the same
in all code pages Progress supports. In other words, a version 6
application that uses only ascii 1-127 should not encounter a problem
when run in version 7. The differences will only occur with the
extended ascii values, those beyond 127.

It is also expected that, when the values are different, they will be
different from machine to machine. For example, the IBM supports
code page IBM850, while the HP supports ROMAN-8 or ISO8859-1,
depending on the configuration.

If the customer is having difficulty running his version 6 application
in version 7 due to this code page conversion, there are two good ways
to control it. The first is specific to the statement that is
affected by the conversion. There is an option on the INPUT and
OUTPUT statements that will suppress the code page conversion. It is
NO-CONVERT and it will force Progress to use the -cpinternal code page
for both memory and stream I/O as it did in version 6.

For example while:

OUTPUT TO myfile.
PUT CHR(219).

may output a different value in version 7 as it did in version 6.

OUTPUT TO myfile NO-CONVERT.
PUT CHR(219).

will output the same value in version 7 as in version according to the
code page specified by -cpinternal.

This can also be controlled at the session level by specifying at
startup which code pages to use. If -cpstream is set to the same
code page as -cpinternal no conversion will take place during the
session and the NO-CONVERT will not be necessary. If this approach
is taken however, the user may find that the extended characters (such
as accented characters) do not display correctly on a GUI terminal,
and if a character terminal is being used the code page must be set
with the -cpterm parameter.

More information about code page conversion, including how to
determine what code pages a user should be using, can be found in
Appendix A of the System Administration Guide.

Quick information about the startup parameters -cpinternal, -cpstream
and -cpterm can be found in the System Administration Reference.


Progress Software Technical Support Note # 15346