[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: XML not well formed for foreign characters



   Hi Scott,
   We're working with an outside group, Valtech, who is creating our new
   website. They generate the XML using information keyed into the website
   (or potentially copy/pasted in) by the customer. They then send the XML
   to our web service via HTTP protocol (Post Method). Our web services
   writes the posted XML data to a file on our IFS and executes the stored
   procedure on the iSeries, which parses the XML using
   http_parse_xml_stmf.
   Our current parameters are as follows:
   if (http_parse_xml_stmf( filename
   : HTTP_XML_CALC
   : *null
   : %paddr(Incoming)
   : *null ) < 0 );
   I've also learned that, if they key the information into their site via
   the keyboard, the XML works. The problem only happens when they
   copy/paste the information into their site. The potential that
   copy/pasting data onto the site means we don't necessarily know what
   we're getting. Naturally, while we're in testing, we could tell Valtech
   not to copy/paste the data, but potentially the customers might
   copy/paste their own information when we go live.
   I found and read some old messages to you from others who had similar
   problems. One person used 1252 as the second parameter. The XML DOES
   have the tag: <?xml version="1.0" encoding="UTF-8" ?>
   I would expect that Valtech would be sending the data properly
   formatted, but apparently they're taking whatever is fed into their
   site and loading it into their XML. Is this something they need to fix
   on their end or that I need to handle on my end?
   Thanks for your help,
   Charlie
   -----Original Message-----
   From: [1]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
   Klement
   Sent: Monday, August 18, 2014 4:00 PM
   To: HTTPAPI and FTPAPI Projects
   Subject: Re: XML not well formed for foreign characters
   Charles,
   Can you tell us a bit more about what you're doing, here? How is the
   file getting to the IFS? How are you ensuring that the data in the file
   does not get translated to the wrong CCSID, and/or how are you ensuring
   that it gets marked with the correct CCSID?
   What parameters are you passing to http_parse_xml_stmf()?
   -SK
   On 8/18/2014 1:52 PM, Versfelt, Charles wrote:
   > We're trying to import and parse XML with http_parse_xml_stmf and
   > getting the error that XML is not well formed.
   > We determined that the problem is a foreign character, ß, as part of
   > one of the text fields.
   > I believe that's a Unicode character?
   > I'm not sure how to solve this one... I imagine it has something to
   do
   > with CCSID or Code Page. I hope someone can help. I expect to have a
   > number of XML files with foreign characters coming in that may
   > encounter this problem.
   > Thanks,
   > Charlie
   >
   > This email has been scanned for viruses by Mimecast.
   >
   >
   >
   >
   ----------------------------------------------------------------------
   > - This is the FTPAPI mailing list. To unsubscribe, please go to:
   > [2]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   -----------------------------------------------------------------------

   This email has been scanned for viruses by Mimecast.

References

   1. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   2. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------