Forum Post: RE: Code page validation

  • Thread starter Thread starter Garry Hall
  • Start date Start date
Status
Not open for further replies.
G

Garry Hall

Guest
For a dataset or temp-table, maybe try converting to XML or JSON. Some quick test code (run with -cpinternal UTF-8): define temp-table tt1 no-undo field f1 as char index ix1 f1. define temp-table tt2 no-undo field f1 as char field f2 as char index ix2 f1 f2. define dataset ds1 for tt1, tt2 data-relation dr1 for tt1, tt2 relation-fields(f1,f1). DEFINE VARIABLE lcds AS LONGCHAR NO-UNDO. DO transaction: create tt1. assign tt1.f1 = "A". create tt2. assign tt2.f1 = tt1.f1 /* Turkish lowercase dotless i * U+0131 = UTF-8 hex 0xc4b1 UTF-8 dec 50353 */ tt2.f2 = CHR(50353). END. /* write to XML encoded with 1252 */ fix-codepage(lcds) = "1252". dataset ds1:handle:write-xml( "LONGCHAR", lcds, false /* formatted */, "1252" /* encoding */). This gives me an error message: Invalid encoding for WRITE-XML. (13515)

Continue reading...
 
Status
Not open for further replies.
Back
Top