S
sjellin.dovetail
Guest
Hi All, Linux, OE11.4 CPINTERNAL is 8859-1 I'm not sure if anyone has encountered the following before --> Webservice with output longchar that returns a UTF-8 XML string (alledgedly). When the XML contains any accented letters or certain other chars then a .net client calling the webservice can't parse the XML. If i write a test program i get data - however if i COPY-LOB the utf-8 longchar to disk its also mangled. If I repeat the same with NO-CONVERT the xml appears valid and can be opened as a valid XML file from disk. The following hilights the issue i'm having -> 1. - This when opened up in IE, xmlnotepad etc is perfectly valid DEFINE TEMP-TABLE ttData NO-UNDO FIELD MyValue AS CHARACTER. CREATE ttData. ttData.MyValue = "Annie Kotzé". FOR EACH ttData: MESSAGE ttData.MyValue VIEW-AS ALERT-BOX INFO BUTTONS OK. END. TEMP-TABLE ttData:WRITE-XML("FILE","C:\temp\out.xml",TRUE,"UTF-8"). 2.This writes "improper" text to disk (implicit convert i'm guessing). replace TEMP-TABLE ttData:WRITE-XML("FILE","C:\temp\out.xml",TRUE,"UTF-8"). with DEFINE VARIABLE cData as LONGCHAR NO-UNDO. FIX-CODE-PAGE(cData) = "UTF-8". TEMP-TABLE ttData:WRITE-XML("LONGCHAR",cData,TRUE,"UTF-8"). copy-lob cData to file "c:\temp\out.xml"). 3. Same as 2 above but change copy-lob cData to file "c:\temp\out.xml"). ti copy-lob cData to file "c:\temp\out.xml") NO-CONVERT. This is now "valid". So I'm thinking that there is some kind of implicit conversion happening between the procedures output longchar and the adapter / tomcat ? any ideas ? Thanks in advance 
Continue reading...
Continue reading...