Skip to main content

Bug Tracker

Side navigation

#7088 closed bug (wontfix)

Opened September 27, 2010 12:57PM UTC

Closed September 27, 2010 01:01PM UTC

Last modified March 07, 2011 07:46AM UTC

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:


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.

Attachments (0)
Change History (2)

Changed September 27, 2010 01:01PM UTC by john comment:1

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.

Changed March 07, 2011 07:46AM UTC by anonymous comment:2

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