[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Luasocket: strange characters in the http request response:
- From: Tim Hill <drtimhill@...>
- Date: Tue, 2 Sep 2014 18:02:41 -0700
On Sep 2, 2014, at 1:02 PM, Coda Highland <chighland@gmail.com> wrote:
> The XML spec says that a UTF-8 BOM is definitely SUPPOSED to be legal.
> If your XML parser can't handle it, then either the device is
> generating the BOM incorrectly (it should be 0xEF 0xBB 0xBF), or
> you're munging it somewhere between receiving it from the socket and
> writing it to a file (possibly implicitly, for example if something
> you're using is trying to be too clever and doing a charset conversion
> when it shouldn't), or your XML parser is in violation of the spec. I
> suspect the first one is the most likely.
>
> /s/ Adam
>
Technically a BOM is never legal in UTF-8, XML spec notwithstanding.
—Tim