Kbase P173880: 4GL/ABL: The OVERLAY statement fails with Chinese multi-byte characters in a UTF-8 environment.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  24/09/2010 |
|
Status: Unverified
SYMPTOM(s):
4GL/ABL: The OVERLAY statement fails with Chinese multi-byte characters in a UTF-8 environment.
Running the following code in a 4GL/ABL client with -cpinternal UTF-8 -cpstream UTF-8, displays only period characters:
DEFINE VARIABLE cFiller AS CHARACTER NO-UNDO.
DEFINE VARIABLE cChinese AS CHARACTER NO-UNDO.
ASSIGN
cFiller = ".........................................."
cChinese = CHR(15252383) + CHR(14990262) + CHR(15120556) + CHR(15247782) + CHR(15178372) + CHR(15179924) + CHR(15182262) + CHR(15302834) + CHR(15053205).
OVERLAY(cFiller,1,LENGTH(cChinese)) = cChinese.
MESSAGE cFiller
VIEW-AS ALERT-BOX INFO BUTTONS OK.
The expected correct output from the above code snippet is the 9 Chinese multi-byte character string followed period characters.
FACT(s) (Environment):
OpenEdge 10.1C04
OpenEdge Category: Language (4GL/ABL)
OpenEdge Category: I18N
OpenEdge 10.2B02
All Supported Operating Systems
CAUSE:
Bug# OE00200426
FIX:
None at this time. As a workaround, use the SUBSTRING function as follows:
DEFINE VARIABLE cFiller AS CHARACTER NO-UNDO.
DEFINE VARIABLE cChinese AS CHARACTER NO-UNDO.
ASSIGN
cFiller = ".........................................."
cChinese = CHR(15252383) + CHR(14990262) + CHR(15120556) + CHR(15247782) + CHR(15178372) + CHR(15179924) + CHR(15182262) + CHR(15302834) + CHR(15053205).
cFiller = cChinese + SUBSTRING(cFiller,LENGTH(cChinese)+ 1).
MESSAGE cFiller
VIEW-AS ALERT-BOX INFO BUTTONS OK.