Kbase P177328: Does Progress convert data between temp table parameters with CLOB fields using different code pages
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/15/2010 |
|
Status: Unverified
GOAL:
Does Progress convert data between temp table parameters with CLOB fields using different code pages?
GOAL:
Is data converted between CLOB fields with different code pages, that are passed as parameters?
FACT(s) (Environment):
If the data is corrupted when it is converted then the error 12009 appears:
Unconvertable character found in source data with code page <code page> to codepage <code page> (12009).
If the code pages of the clob fields are not compatible then the result will be:
Cannot convert between CLOB column codepage <code page> and <code page>. (14472).
All Supported Operating Systems
OpenEdge 10.2x
FIX:
Yes. When passing temp tables as parameters Progress does perform conversions between CLOB filed code pages. For example:
/******* Calling program ***********/
DEFINE TEMP-TABLE tt1 NO-UNDO
FIELD cc AS CLOB COLUMN-CODEPAGE "utf-8":U.
DEFINE VARIABLE c1 AS CHARACTER NO-UNDO.
DEFINE VARIABLE l1 AS LONGCHAR NO-UNDO.
DEFINE VARIABLE l2 AS LONGCHAR NO-UNDO.
FIX-CODEPAGE(l1) = "1252".
FIX-CODEPAGE(l2) = "1252".
c1 = CHR(128,"1252","1252"). /* Euro */
l1 = c1.
CREATE tt1.
COPY-LOB FROM l1 TO tt1.cc.
COPY-LOB FROM tt1.cc TO l2.
/ *** Display 1252 1 byte Euro ******/
MESSAGE STRING(l2) SKIP
LENGTH(l2,"raw")
VIEW-AS ALERT-BOX INFO BUTTONS OK.
RUN test2.p (INPUT-OUTPUT TABLE tt1).
/********** Called program - test2.p ***********/
DEFINE TEMP-TABLE tt2 NO-UNDO
FIELD cc AS CLOB COLUMN-CODEPAGE "1252":U.
DEFINE INPUT-OUTPUT PARAMETER TABLE FOR tt2.
DEFINE VARIABLE l3 AS LONGCHAR NO-UNDO.
FIX-CODEPAGE(l3) = "utf-8".
FIND FIRST tt2.
COPY-LOB FROM tt2.cc TO l3. /* Copy 1252 Euro to UTF-8 Longchar */
/ *** Display UTF-8 3 byte Euro ******/
MESSAGE STRING(l3) SKIP
LENGTH(l3,"RAW")
VIEW-AS ALERT-BOX INFO BUTTONS OK.