Re: [PATCH v3] utf8: handle systems that don't write BOM for UTF-16

2019-02-11 Thread Junio C Hamano
"brian m. carlson" writes: > I've just sent a v4 with this squashed in. Whether you want to pick that > up or squash this into v3 is up to you. Let's take yours, as there is no point doing an eval for these two; for that matter, braces around ${i} are also pointless, but I'll let them pass. Tha

Re: [PATCH v3] utf8: handle systems that don't write BOM for UTF-16

2019-02-11 Thread brian m. carlson
On Mon, Feb 11, 2019 at 04:31:00PM -0800, Junio C Hamano wrote: > "brian m. carlson" writes: > > >> - cat lf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >lf.utf${i}.raw && > >> - cat crlf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >crlf.utf${i}.raw && > >> + cat lf.utf8.raw | eval "write_u

Re: [PATCH v3] utf8: handle systems that don't write BOM for UTF-16

2019-02-11 Thread Junio C Hamano
"brian m. carlson" writes: >> - cat lf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >lf.utf${i}.raw && >> - cat crlf.utf8.raw | iconv -f UTF-8 -t UTF-${i} >crlf.utf${i}.raw && >> + cat lf.utf8.raw | eval "write_utf${i}" >lf.utf${i}.raw && >> + cat crlf.utf8.raw | eval "write_utf$

Re: [PATCH v3] utf8: handle systems that don't write BOM for UTF-16

2019-02-11 Thread brian m. carlson
On Mon, Feb 11, 2019 at 10:43:06PM +0100, Kevin Daudt wrote: > With some additional fixes, this indeed does solve the issue for Alpine > Linux, thanks. > > I had to fix the following as well: > > iff --git a/t/t0028-working-tree-encoding.sh > b/t/t0028-working-tree-encoding.sh > index 8936ba6757

Re: [PATCH v3] utf8: handle systems that don't write BOM for UTF-16

2019-02-11 Thread Kevin Daudt
On Mon, Feb 11, 2019 at 01:26:39AM +, brian m. carlson wrote: > When serializing UTF-16 (and UTF-32), there are three possible ways to > write the stream. One can write the data with a BOM in either big-endian > or little-endian format, or one can write the data without a BOM in > big-endian fo