Re: [PATCH v6 4/7] utf8: add function to detect a missing UTF-16/32 BOM

2018-02-09 Thread Lars Schneider
> On 09 Feb 2018, at 20:28, Junio C Hamano wrote: > > lars.schnei...@autodesk.com writes: > >> From: Lars Schneider >> >> If the endianness is not defined in the encoding name, then let's >> ... >> [3] https://encoding.spec.whatwg.org/#utf-16le >> >> Signed-off-by: Lars Schneider >> >> utf

Re: [PATCH v6 4/7] utf8: add function to detect a missing UTF-16/32 BOM

2018-02-09 Thread Junio C Hamano
lars.schnei...@autodesk.com writes: > From: Lars Schneider > > If the endianness is not defined in the encoding name, then let's > ... > [3] https://encoding.spec.whatwg.org/#utf-16le > > Signed-off-by: Lars Schneider > > utf > --- Huh? > utf8.c | 13 + > utf8.h | 16 +

[PATCH v6 4/7] utf8: add function to detect a missing UTF-16/32 BOM

2018-02-09 Thread lars . schneider
From: Lars Schneider If the endianness is not defined in the encoding name, then let's be strict and require a BOM to avoid any encoding confusion. The is_missing_required_utf_bom() function returns true if a required BOM is missing. The Unicode standard instructs to assume big-endian if there i