Re: [PATCH v10 7/9] convert: check for detectable errors in UTF encodings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 7, 2018, 22:32 UTC
- Message-ID
- <xmqqa7vjzfcp.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <B001E8E2-9C98-4136-87A3-4425C50E90DB@gmail.com>
Lars Schneider <larsxschneider@gmail.com> writes:
> I also would have liked to advise "UTF-16" instead of "UTF16" as > you suggested. However, that required a few more lines and I wanted > to keep the change to a minimum. I feel this could be added in a > follow up patch.
I'd say the whole upcase thing belongs to such a follow-up patch if that is the case.
Show 6 quoted lines
>> On the other hand, if we are not enforcing such a policy decision >> but merely explaining a way to work around this check, then it may >> be better to give a variant with the smaller difference from the >> original (i.e. without up-casing). > > See example mentioned above: "Utf-16". How would you handle that?
Dropping LE suffix from "Utf-16LE" or "Utf16LE" would yield "Utf-16" or "Utf16" if the advise message does not force policy, or "UTF-16" in the canoical form if it does. Is there a problem?