[Developers] mqlread http response header (content-type)
Augusto Callejas
acallejas at appliedminds.com
Fri Sep 19 17:44:32 UTC 2008
the decoding of \u001a is not happening in the JSON layer, but in the HTTP
layer:
compare:
“\u001a” --(HTTP utf-8 charset)--> string with one character 0x1a
--(JSON)-->
invalid character in JSON (should be encoded)
with:
“\u001a”--(HTTP w/o utf-8 charset) --> “\u001a” --(JSON)--> string with one
character 0x1a
On 9/19/08 10:27 AM, "Christopher R. Maden" <crism at metaweb.com> wrote:
> Augusto Callejas wrote: > alec- > > there is no reason why i need
> "application/json". > i'm more concerned that the current response includes
> "char-set=utf-8" > > from my previous reply to the mailing list: > > my
> problem is with the mqlread HTTP response header Content-type, which is >
> returning char-set=²utf-8². To not advertise the charset in the HTTP header
> would be to assert that the encoding is ISO-8859-1 (see RFC 2616), which is
> wrong. The encoding *is* UTF-8. The sequence backslash-u-0-0-1-a is
> perfectly legal; some library you’re using (probably the JSON layer) is
> turning backslash-u-0-0-1-a into a troublesome byte, but the problem is not
> the charset declaration in the HTTP headers. ~Chris -- Christopher R.
> Maden Data Architect Freebase.com: <URL: http://www.freebase.com/ > Metaweb
> Technologes, Inc. <URL: http://www.metaweb.com/
> > _______________________________________________ Developers mailing
> list Developers at freebase.com http://lists.freebase.com/mailman/listinfo/develo
> pers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20080919/0a6c32b0/attachment.htm
More information about the Developers
mailing list