Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7088 closed bug (wontfix)

not bug, but... JSON parser and BOM (Byte order mark)

Reported by: olden Owned by:
Priority: low Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: utf8, utf-8, JSON, BOM Cc:
Blocked by: Blocking:


Example. A request from the client is processed on the server by a PHP-script (UTF-8). The script file begins with "<?php". But before "<?php" there are 3 bytes BOM (EF BB BF for UTF-8). These bytes are present in body of the JSON-response to the client. jQuery receives such JSON-response in a kind "EFBBBF{" var1 ":" val1 "," var2 ":" val2 "...}" also considers that it not format JSON.

Change History (2)

comment:1 Changed 12 years ago by john

Resolution: wontfix
Status: newclosed

Seems like that's something that should be trimmed out on the server side prior to the request then? Or if the request is done it should be trimmed out on the client.

comment:2 Changed 12 years ago by anonymous

Well, using BOMs in content advertised as application/json is in conflict with RFC4627 (see section "3. Encoding")

Note: See TracTickets for help on using tickets.