[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: UTF-8 vs UTF-16
I need to explain this ....
XML like JSON is a syntax, Whatever you put into the data section can
in XML be encoded
where in JSON it has to be encoded in UTF-8.
The tag names and the data pack has for most to be in 7 bit ASCII �
On Fri, Feb 28, 2014 at 12:21 AM, Henrik Rützou <[1]hr@xxxxxxxxxxxx>
wrote:
�<?xml encoding="utf-16"?>
is ascii
On Fri, Feb 28, 2014 at 12:00 AM, Robert Frohne
<[2]RFrohne@xxxxxxxxxxxxxxxx> wrote:
OK, another question:
How can I get this to work? �It is apparently sending back xml as
encoding="utf-16", but I'm getting the ubiquitous error of "XML
parse failed at line 1, col 30: encoding specified in XML
declaration is inc."
uri = '[3]https://api.zip2tax.com/TaxRate-USA.xml?' +
� � � 'username=sample&password=password&zip=90210';
�rc = http_url_get_xml(uri: *null: %paddr(getXml): *null);
�if (rc <> 1);
� �http_crash();
�endif;
It seems to me the problem resides with how the data is sent back.
�It has a header saying "uff-16" when actually it is probably
utf-8.
Robert Frohne
IT Manager
CLEAN
1316 South 7th Street
St. Louis, MO 63104
[4]314.421.1234� Tel
[5]RFrohne@xxxxxxxxxxxxxxxx
[6]www.cleanuniform.com
-----Original Message-----
From: [7]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[8]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Scott
Klement
Sent: Wednesday, February 26, 2014 3:46 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: UTF-8 vs UTF-16
Robert,
HTTP_XML_CALC means that Expat will try to calculate the proper
encoding
to use based on the contents of the file. �If your file is in UTF-16
format, and has a header of <?xml encoding="utf-16"?> at the top, then
it should automatically work.
If you want to force it to always use UTF-16 rather than detecting it,
you can change 'HTTP_XML_CALC' to just use the number 1200 (which is
the
CCSID of UTF-16).
Hope that helps!
On 2/26/2014 2:00 PM, Robert Frohne wrote:
> Can anyone help?
>
> When I'm using this bad-boy, how can I get it working with UTF-16
encoding?
>
> � if (http_parse_xml_stmf( filename
> � � � � � � � � � � � � �: HTTP_XML_CALC
> � � � � � � � � � � � � �: *null
> � � � � � � � � � � � � �: %paddr(Incoming)
> � � � � � � � � � � � � �: *null ) < 0 );
>
>
>
>
> Robert Frohne
> IT Manager
> CLEAN
> 1316 South 7th Street
> St. Louis, MO 63104
> [9]314.421.1234 �Tel
> [10]RFrohne@xxxxxxxxxxxxxxxx
> [11]www.cleanuniform.com
>
>
-----------------------------------------------------------------------
> This is the FTPAPI mailing list. �To unsubscribe, please go to:
> [12]http://www.scottklement.com/mailman/listinfo/ftpapi
>
-----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[13]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[14]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
--
Regards,
Henrik Rützou
� [15]http://powerEXT.com
�
--
Regards,
Henrik Rützou
� [16]http://powerEXT.com
�
References
1. mailto:hr@xxxxxxxxxxxx
2. mailto:RFrohne@xxxxxxxxxxxxxxxx
3. https://api.zip2tax.com/TaxRate-USA.xml
4. tel:314.421.1234
5. mailto:RFrohne@xxxxxxxxxxxxxxxx
6. http://www.cleanuniform.com/
7. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
8. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
9. tel:314.421.1234
10. mailto:RFrohne@xxxxxxxxxxxxxxxx
11. http://www.cleanuniform.com/
12. http://www.scottklement.com/mailman/listinfo/ftpapi
13. http://www.scottklement.com/mailman/listinfo/ftpapi
14. http://www.scottklement.com/mailman/listinfo/ftpapi
15. http://powerext.com/
16. http://powerext.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------