git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Lars Schneider <larsxschneider@gmail.com>,
	lars.schneider@autodesk.com, git@vger.kernel.org, j6t@kdbg.org,
	sunshine@sunshineco.com, peff@peff.net,
	ramsay@ramsayjones.plus.com, Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v9 4/8] utf8: add function to detect a missing UTF-16/32 BOM
Date: Wed, 7 Mar 2018 18:39:11 +0100	[thread overview]
Message-ID: <20180307173911.GA19262@tor.lan> (raw)
In-Reply-To: <xmqqpo4g22tv.fsf@gitster-ct.c.googlers.com>

On Tue, Mar 06, 2018 at 03:37:16PM -0800, Junio C Hamano wrote:
> Lars Schneider <larsxschneider@gmail.com> writes:
> 
> > After thinking about it I wonder if we should barf on "utf16" without
> > dash. Your Linux iconv would handle this correctly. My macOS iconv would not.
> > That means the repo would checkout correctly on your machine but not on mine.
> >
> > What do you think?
> 
> To be bluntly honest, I prefer not to have excess "sanity checks";
> there is no need to barf on utf16 in a project run by those who are
> without macOS friends, for example.  For that matter, while I do not
> hate it so much to reject it, I am not all that supportive of this
> "The consortium says without -LE or -BE suffix there must be BOM,
> and this lacks one, so barf loudly" step in this topic myself.

Loosing or adding a BOM couild render a file useless, depending
on the SW that reads and processes it.

The main reason for being critacal is to make sure that the
material in the working-tree does a safe roundtrip when commited,
pushed, pulled, checked out...

The best thing we can do is probably to follow the specification as
good as possible.

Having a clear specification (UTF-16LE/BE has no BOM, UTF-16 has none,
UTF-16 has a BOM) would even open the chance to work around a buggy
iconv library, because Git can check the BOM.
If, and only if, a platform messes it up, and we want to
make a (compile time) workaround in Git for this very platform.

A consistant behavior across all platforms is a good thing,
sometimes I have a network share mounted to Linux, MacOS and
Windows and it doesn't matter under which Git on which
machine I checkout or commit.

Oh, I see, there is a new patch coming...

  reply	other threads:[~2018-03-07 17:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04 20:14 [PATCH v9 0/8] convert: add support for different encodings lars.schneider
2018-03-04 20:14 ` [PATCH v9 1/8] strbuf: remove unnecessary NUL assignment in xstrdup_tolower() lars.schneider
2018-03-04 20:14 ` [PATCH v9 2/8] strbuf: add xstrdup_toupper() lars.schneider
2018-03-04 20:14 ` [PATCH v9 3/8] utf8: add function to detect prohibited UTF-16/32 BOM lars.schneider
2018-03-04 20:14 ` [PATCH v9 4/8] utf8: add function to detect a missing " lars.schneider
2018-03-06 20:50   ` Junio C Hamano
2018-03-06 22:39     ` Lars Schneider
2018-03-06 22:53       ` Junio C Hamano
2018-03-06 23:00         ` Lars Schneider
2018-03-06 23:07         ` Junio C Hamano
2018-03-06 23:12           ` Lars Schneider
2018-03-06 23:37             ` Junio C Hamano
2018-03-07 17:39               ` Torsten Bögershausen [this message]
2018-03-04 20:14 ` [PATCH v9 5/8] convert: add 'working-tree-encoding' attribute lars.schneider
2018-03-06 20:42   ` Eric Sunshine
2018-03-06 22:13     ` Lars Schneider
2018-03-06 22:22       ` Eric Sunshine
2018-03-04 20:14 ` [PATCH v9 6/8] convert: check for detectable errors in UTF encodings lars.schneider
2018-03-05 21:50   ` Junio C Hamano
2018-03-05 23:45     ` Lars Schneider
2018-03-06  1:23       ` Junio C Hamano
2018-03-06 17:03         ` Lars Schneider
2018-03-06 20:55   ` Eric Sunshine
2018-03-04 20:14 ` [PATCH v9 7/8] convert: add tracing for 'working-tree-encoding' attribute lars.schneider
2018-03-04 20:14 ` [PATCH v9 8/8] convert: add round trip check based on 'core.checkRoundtripEncoding' lars.schneider
2018-03-06 21:05 ` [PATCH v9 0/8] convert: add support for different encodings Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307173911.GA19262@tor.lan \
    --to=tboegi@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=lars.schneider@autodesk.com \
    --cc=larsxschneider@gmail.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).