From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 912FF1F5AE for ; Wed, 5 May 2021 04:34:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbhEEEfd (ORCPT ); Wed, 5 May 2021 00:35:33 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:56494 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbhEEEfd (ORCPT ); Wed, 5 May 2021 00:35:33 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 50AA111B6AE; Wed, 5 May 2021 00:34:37 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=VFAFPMptHC481kbRAVEI+8jX6UDIQx3moc5M0K rNgrU=; b=Xg0i3yvdTeUuYDuY71zfErK+snDOk0xYYW0Q+nr3PnJ+L3JxyeJ3I8 b8adKLOMqY9/voC30mysMUOlG8oqwnbYM9LVlOt25mmbqgD1uzRAp2DVqMZ3id7M 9k5HaegZR9NveIWyq/bnHFQM09SXR9dXDRXIz9ZZnw/2uNdkkSS9w= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 4996D11B6AD; Wed, 5 May 2021 00:34:37 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 82D1911B6AC; Wed, 5 May 2021 00:34:34 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Tzadik Vanderhoof Cc: Andrew Oakley , Luke Diamand , Git List , Feiyang Xue Subject: Re: [PATCH 2/2] git-p4: do not decode data from perforce by default References: <20210412085251.51475-1-andrew@adoakley.name> <20210412085251.51475-3-andrew@adoakley.name> <20210430095342.58134e4e@ado-tr> <021c0caf-8e6f-4fbb-6ff7-40bacbe5de38@diamand.org> <20210504220153.1d9f0cb2@ado-tr> Date: Wed, 05 May 2021 13:34:32 +0900 In-Reply-To: (Tzadik Vanderhoof's message of "Tue, 4 May 2021 21:02:54 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 314A33B0-AD5B-11EB-8E20-D609E328BF65-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Tzadik Vanderhoof writes: > On Tue, May 4, 2021 at 6:11 PM Junio C Hamano wrote: >> >> Tzadik Vanderhoof writes: >> >> > On Tue, May 4, 2021 at 2:01 PM Andrew Oakley wrote: >> >> The key thing that I'm trying to point out here is that the encoding is >> >> not necessarily consistent between different commits. The changes that >> >> you have proposed force you to pick one encoding that will be used for >> >> every commit. If it's wrong then data will be corrupted, and there is >> >> no option provided to avoid that. The only way I can see to avoid this >> >> issue is to not attempt to re-encode the data - just pass it directly >> >> to git. >> > ... > Are you talking about a scenario where most of the commits are UTF-8, > one is "cp1252" and another one is "cp1251", so a total of 3 encodings > are used in the Perforce depot? I don't think that is a common scenario. Yes. I think that is where "not necessarily consistent between different commits" leads us to---not limited only to two encodings. > I agree with the idea that if you know what the encoding is, then > why not just use that knowledge to convert that to UTF-8, rather > than use the encoding header.