C++ Logo

SG16

Advanced search

Subject: Re: [SG16-Unicode] BOM in JSON (was: Re: SG16 meeting summary for July 31st, 2019)
From: Ben Boeckel (ben.boeckel_at_[hidden])
Date: 2019-08-19 07:30:32


On Mon, Aug 19, 2019 at 08:16:26 +0300, Henri Sivonen wrote:
> For formats that, for legacy reasons, support multiple encodings, the
> benefit is that iäthe BOM unambiguously signals UTF-8. For UTF-8-only
> formats, the benefit of not treating the BOM as an error is to allow
> authoring with tools designed for the kind of formats where the BOM
> actually signals UTF-8 relative to other possibilities.

The format specifies that it only accepts UTF-8. Within that context, is
it sensible to expect implementations handle a BOM? Remember that it is
mostly a format between tools and it is JSON because being able to debug
it is very useful (without mandating even more code for tools to inspect
yet another container format). These things should not be written by
hand or edited manually, so what does one gain by allowing an encoded
BOM?

--Ben


SG16 list run by sg16-owner@lists.isocpp.org