"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes: > On Sun, Feb 10, 2019 at 08:04:13AM +0000, Torsten Bögershausen wrote: > >> I think we agree that Git will write UTF-16 always as big endian with BOM, >> following the tradition of iconv/libiconv. >> If yes, we can reduce the lines of code/#idefs somewhat, have the knob always on, >> and reduce the maintenance burden a little bit, giving a simpler patch. > > No, I don't think it will. libiconv will always write big-endian, but > glibc has a separate iconv implementation which writes the native > endianness. (I believe FreeBSD's does the same thing as glibc's.) I > think it's useful for us to know that we can handle UTF-16 using the > system behavior where possible, since that's what the system is going to > produce. > >> What do you think ? > > While I like the simplicity of the approach, as I mentioned above, and I > did consider this originally, I'd rather test the behavior of the system > we're operating on, provided it's suitable for our needs. I see both sides of the argument, and each has its merit. Let's go with the "follow the platform" and make sure the decision is documented somewhere in the resulting code. Thanks, all.