Modify ↓
Ticket #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: | |
| Blocking: | Blocked by: |
Description
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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.