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
Hmmm… scratch that. The error is about the codepage I specified, not a failure in WRITE-XML. I will look to see if I can refine this to give a message during conversion. From: Garry Hall [mailto:bounce-gih@community.progress.com] Sent: Friday, February 21, 2014 9:13 AM To: TU.OE.Development@community.progress.com Subject: RE: Code page validation RE: Code page validation Reply by Garry Hall 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) Stop receiving emails on this subject. Flag this post as spam/abuse.

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