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

http_parse_xml_stmf CCSID problem



   Hi Scott.
   Thanks for a REALLY helpful site and product.
   In a project I SOMETIMES  get the SetError() Æ66: XML parse failed at
   line 1, col 8552: not well-formed (invalid token)
   Today  I was  "kicked out" of the paring because of the Spanish letter
    Ñ as in..:  <ConsignorAddress1>JR. MARAÑON  247-251
   CALLAO</ConsignorAddress1>
   When trying to view the file in internet  explorer  I get :
   [cid:_1_07D9EAD007D9E87C005100CBC125777B]
   My call to the parser  is like this:

   if (http_parse_xml_stmf( filename
                          : HTTP_XML_CALC
                          : *null
                          : %paddr(Incoming)
                          : *null ) < 0 );
      PrintLine = http_error();
      except;
   ...
   I have tried to read in the  FTPAPI list archieves and undertand that
   parameter 2 is essential and by TRYING / GUESSING  I found that  ccsid
   1252 works....
   if (http_parse_xml_stmf( filename
                          : 1252     
                          : *null
   THIS solves my immediate problem, but I don't like it because this job
   is set up  parse XML from multiple parties
   (but this customer/project has only one party for the time being ...)

   Am I correct when assuming that when the  "encoding= " is not found in
   the start of the xml file  it defaults to UTF-8  ??
   Is ccsid 1552 the same as MS-WIN LATIN-1 (get indication of that when
   i google it ) in other words - the same as ISO-8859-1 ????
   MY question is : IS there ANY WAY     that  I can see / verify the
   encoding of a received XML-file.. 
   I THINK I  have heard / read in the documentation of this Service that
   it should be UTF-8 
   Is there anyway I can "bang the service provider in the head" an say:
    "..hear now - you said UTF-8 but,  this is ISO-8859-1 ..." 
   in the httpapi_Debug file o find "xml_Remote=1552  (is this
   trustworthy, or just a consequence of the IFS-files ccsid ??? )
   http_close(): entered                                         
   New XML iconv() objects set, xml_Remote=1252. xml_Local=1208  
   http_url_post(): entered                                      
   As you can see in the example file there is no start-tag like <?xml
   version="1.0" encoding="utf-8"?> (or similar )
   PS!!
   I should mention that in front of this I have retrieved the file via a

   http_url_post_xml(
   where             "<?xml version="1.0" encoding="utf-8"?>'   " starts
   the SOAP - post string...
   with the parameter/function         "(GetInnerDoc)"
   I guess that this cannot in some way change the encoding ???
   The reply form the service  (without using GetInnerDoc  / when looking
   at the  httpapi_Debug file)
    <return
   xsi:type="xsd:string">&lt;SkynetExchange&gt;&lt;MasterManifests&gt;&lt
   ;Mastermanifest&gt;&lt;Id&gt;{70AEA5BE-7081-441F-BF3F-66D7


   Med vennlig hilsen / Best regards
   Jan Ottar Valderhaug
   SYSTEMA AS
   St.Halvardsgt. 33A , 0192 Oslo
   Tel: +47 22660660   Direct: +47 22660654   Mob: +47 48052470   Fax:
   +47 22660661

GIF image

Attachment: SKYMan_2010-08-10-08.08.25.xml
Description: Binary data

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------