Kbase P36438: Error 8774 and 8773 when compiling with cprcodeout UTF-8
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/22/2011 |
|
Status: Unverified
SYMPTOM(s):
Error 8774 and 8773 when compiling with cprcodeout UTF-8
For this -cprcodeout, -cpinternal should have the same value. (8774)
Compiling with Unicode cprcodeout gives error 8774.
Compile aborted. (8773)
FACT(s) (Environment):
The session -cpinternal setting is not UTF-8 but is probably a single byte code page, for example 1252 or iso8859-1.
The session -cprcodeout setting is UTF-8.
Source code strings with extended characters (e.g. c1 = "Hello" + "?".) will trigger this error.
Progress 9.x
All Supported Operating Systems
OpenEdge 10.x
CAUSE:
This is expected behavior. Progress does not allow the text segment to expand when the compiled r-code is created. This will happen using a (single byte) cpinternal setting different from Unicode UTF-8. Single byte extended characters will always expand to several bytes when converted to UTF-8. Because of this, compilation of ASCII text values (below positions 128) will work, but extended characters (above position 128) will fail.
FIX:
The easiest way to work around this problem is to compile using -cpinternal UTF-8. But if this is not possible (for example with the Character client) then compile using the batch client -b which does support -cpinternal UTF-8.
Another option is to construct source code strings with the CHR function because the CHR function is not evaluated at compile time and so its characters will not be written to the text segment or any XREF file for translation. For example c1 = "Hello" + CHR(128,"1252","1252".).