From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id BjOiHzmq02CM/QAAgWs5BA (envelope-from ) for ; Wed, 23 Jun 2021 23:40:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2DvgGjmq02BnIwAA1q6Kng (envelope-from ) for ; Wed, 23 Jun 2021 21:40:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 37CC9250EF for ; Wed, 23 Jun 2021 23:40:09 +0200 (CEST) Received: from localhost ([::1]:40578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwAbP-0007Ue-VV for larch@yhetil.org; Wed, 23 Jun 2021 17:40:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwAbK-0007UN-Ry for guix-patches@gnu.org; Wed, 23 Jun 2021 17:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwAbK-0001i8-HM for guix-patches@gnu.org; Wed, 23 Jun 2021 17:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwAbK-0006Zz-Eu for guix-patches@gnu.org; Wed, 23 Jun 2021 17:40:02 -0400 Subject: bug#49082: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 23 Jun 2021 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 49082 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: 49082-done@debbugs.gnu.org Mail-Followup-To: 49082@debbugs.gnu.org, ludo@gnu.org, andrew@trop.in Received: via spool by 49082-done@debbugs.gnu.org id=D49082.162448437425246 (code D ref 49082); Wed, 23 Jun 2021 21:40:02 +0000 Received: (at 49082-done) by debbugs.gnu.org; 23 Jun 2021 21:39:34 +0000 Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwAas-0006Z8-L9 for submit@debbugs.gnu.org; Wed, 23 Jun 2021 17:39:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwAaq-0006Yt-N7 for 49082-done@debbugs.gnu.org; Wed, 23 Jun 2021 17:39:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51904) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwAal-0001LB-7a; Wed, 23 Jun 2021 17:39:27 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35418 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwAal-0005jV-09; Wed, 23 Jun 2021 17:39:27 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87bl836bdy.fsf@trop.in> Date: Wed, 23 Jun 2021 23:39:25 +0200 In-Reply-To: <87bl836bdy.fsf@trop.in> (Andrew Tropin's message of "Fri, 18 Jun 2021 07:15:36 +0300") Message-ID: <875yy4uupe.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624484409; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=5alpYwtIhHDwGtw2PuuaYmEtD1EhQT3EdgDXSKSRFxI=; b=HfiR/zEJ55+TLVyltDbPIVo/uAx2uaUOq/FY6cIG2VE+aQr7q/VVhshs7G2qKyjj7mLln+ DthKxAnZsu2NU5T35MpDCt3O37iDKAfkgBC7mZDRZdarLsVUAQfijvkWVSh4pvi1Mi6rZv hosGM3GXFZCvjY4IAEL9q6+90TqseQEn1YS0U52xDqMfiPuD+n/6FlpQavoWD0rX6LULUJ D/BvNp5S16Y4VMelVLGmNkuX0+isPE2sEVDQQonOTulWqwrNuWUXf1F7d32T9uB5grttZ7 BSH21l0kHNzJaFdz5rV0bv2mV6tWol/mF+pWHNkpDKjHAkaPANwdpV7Rrpic5w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624484409; a=rsa-sha256; cv=none; b=OWDzhz+F9AdAKwjlMLyoZXLeP6Mc/h5eSKjgOW2abDmL7qHgC6aTUSZwiDJ8xNAufogn74 IZEwaNJpcyTlOwI8L11aslzzCbXp3sdRsgi33JRMu0HTeDHNiX7dvdewOdOzFLtDE6I0hg +9TI2iv9zinfMh7ho+erzYz9By47QWl/x4ctIxTnNFc0vTGGdIo0aVUf1hC+Tg8uUp5NdB Pirf8TLT4dVFwMXLaj7rzckJUbndVTqCOkDfo+XDlc3kIii0ngTdtrAmWPYuXYjJaUYSiL 0Xr1DJIq2caTDboj6Ewb2NNge9IAX4tArXwlRtCkb7DGqtJeqLfjAzdRIz1wPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 37CC9250EF X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: PrDl/Vg3JlXr Hi, Andrew Tropin skribis: > guix/gexp.scm (mixed-text-file): It's necessary because if some UTF-8 sym= bols > appear in configuration, resulting file in the store will contain ? inste= ad of > it. Good catch! Applied as 1f3d7b45349d43e5cc02594083e0cd44ef730992. Please look how I modified the commit log, in line with our conventions and previous entries for this file. > (define build > (gexp (call-with-output-file (ungexp output "out") > (lambda (port) > + (set-port-encoding! port "UTF-8") Leo is right that we=E2=80=99d often write: (parameterize ((%default-port-encoding "UTF-8")) (call-with-output-file =E2=80=A6)) because it=E2=80=99s marginally cleaner (the port is created with the right encoding from the start). In this case it doesn=E2=80=99t matter much thou= gh. Thank you! Ludo=E2=80=99.