Webservice and codepage

Posted by goo on 27-Jun-2018 01:30


We have a webservice that receives an XML document in a longchar. If I remember correct you may use fix-codepage(lcVariable) = '.....' to set the codepage for the longchar. Since our db is iSO8859-1, I assume that the codepage will convert what it gets from the webservice into iso8859-1. 

What happens if the XML is UTF-8 or UTF-16? Since there is several systems sending info to the webservice, I assume that we could get several different types of XML documents with different encoding. How should we handle that?

It seems to work as it is, but now and then we get crapy characters, so I assume it has something to do with this. I know I could peek into the xml and get the encoding, but since I already have received the document into a longchar that probably already have done some convertion, I assume that the content of the longchar is corrupt. 

All Replies

Posted by goo on 27-Jun-2018 02:30

And fix-codepage() can't be done, since it is filled before I get to do a fix-codepage() hence it is an input parameter.

This thread is closed