From unknown Wed Jun 18 23:09:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49082 <49082@debbugs.gnu.org> To: bug#49082 <49082@debbugs.gnu.org> Subject: Status: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file Reply-To: bug#49082 <49082@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:09:06 +0000 retitle 49082 [PATCH] guix: gexp: Make UTF-8 a default port encoding in mix= ed-text-file reassign 49082 guix-patches submitter 49082 Andrew Tropin severity 49082 normal tag 49082 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 00:32:38 2021 Received: (at submit) by debbugs.gnu.org; 18 Jun 2021 04:32:38 +0000 Received: from localhost ([127.0.0.1]:55424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu6BK-0002NL-Hh for submit@debbugs.gnu.org; Fri, 18 Jun 2021 00:32:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu6BH-0002NC-Ol for submit@debbugs.gnu.org; Fri, 18 Jun 2021 00:32:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6BH-0001fs-BL for guix-patches@gnu.org; Fri, 18 Jun 2021 00:32:35 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:42712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lu6BF-0002XK-Ny for guix-patches@gnu.org; Fri, 18 Jun 2021 00:32:35 -0400 Received: by mail-lj1-x22c.google.com with SMTP id r16so12164135ljk.9 for ; Thu, 17 Jun 2021 21:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=ZT7O4JeZ7Sc4HhbU6/yh9pRSeRvh8Rx7qWXJMjx8WR4=; b=kGkBRz+6Iw57gE7tsWXOuxWDYl06zlAytcs5rq+FPCm8ehZ4QKp5M0sJzgDkygE7X6 +vnsolPTP8Nlz4MISqCE53MznN1AnWmnXrtQ/d+JApMTI3erdkpP58TNcPObhwq01XQS e7cWzv2brVH6D5RfRBzcQDfHiY4QZPnUueUtGhFMw2XsgTkVa5ejzrf/L3oBTZAUDunM CSL/SzwfUyiZq4hfYHSQB8S4bFC0qE+dcg/1gWhDl4eVpLCldI9hX93vu2bGjL+Pbhpr c6wm/R2EisFpU9Lc0oHspLjpmObO9aLqZoz09KNTZjt2h6idUqbThz7rewrdPBV3VIrd pPIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=ZT7O4JeZ7Sc4HhbU6/yh9pRSeRvh8Rx7qWXJMjx8WR4=; b=S5kU9oAwp+IPTdVzvuqO3f3TNJeULvleRvv0rffxa7MGxQZ9OlO5jaPHuL1bg3sltQ EoKja4XB/jBHrwigB1xdnGG5GriNIh7kBGsXOUM/ld4zpfKC9xqvt9Hjk6yisVBpi/X/ raKBcU96D/VklI+Gu4lEFxtLse/2HEL86HKTuPSkYgd7X75h41OmTo6Ka2Eaz7F1ap7Y VEMmlQmIWldFGM0wn7dw8Z/QMNF5xHpxFYrtju3al1Wi8LymjgtVLOYv60inkUz1pjpm tZkpQQ4AkJqY1HTNGuqnwQP+Mro1NaicIJbR4T8TI98EgAVJotJZMIi4TCr77B77VSHc 5CQg== X-Gm-Message-State: AOAM5303gRTJlVzeVbWlLdySH7K9N5Abxdoxcdb92ENDRkbcIk3WFnUn 95swKl0RGth+rJlTskh5attChFXefA2HiA== X-Google-Smtp-Source: ABdhPJw8oK5wUw2cHJP1DFFsqXhTpMRbvMQbDilZbILd3l+baSAAfTsKxfsBKgMZMiAhfEMSQXTVyw== X-Received: by 2002:a2e:b166:: with SMTP id a6mr7845761ljm.4.1623990749850; Thu, 17 Jun 2021 21:32:29 -0700 (PDT) Received: from ixy (109-252-117-164.nat.spd-mgts.ru. [109.252.117.164]) by smtp.gmail.com with ESMTPSA id k22sm766038lfu.187.2021.06.17.21.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 21:32:29 -0700 (PDT) From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file Date: Fri, 18 Jun 2021 07:15:36 +0300 Message-ID: <87bl836bdy.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2a00:1450:4864:20::22c; envelope-from=andrew@trop.in; helo=mail-lj1-x22c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) guix/gexp.scm (mixed-text-file): It's necessary because if some UTF-8 symbols appear in configuration, resulting file in the store will contain ? instead of it. --- guix/gexp.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/gexp.scm b/guix/gexp.scm index afb935761e..187f5c5e85 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -1921,6 +1921,7 @@ This is the declarative counterpart of 'text-file*'." (define build (gexp (call-with-output-file (ungexp output "out") (lambda (port) + (set-port-encoding! port "UTF-8") (display (string-append (ungexp-splicing text)) port))))) (computed-file name build)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 03:55:15 2021 Received: (at 49082) by debbugs.gnu.org; 18 Jun 2021 07:55:15 +0000 Received: from localhost ([127.0.0.1]:55693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu9LP-0007Wb-Jx for submit@debbugs.gnu.org; Fri, 18 Jun 2021 03:55:15 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:25435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu9LL-0007WK-4U for 49082@debbugs.gnu.org; Fri, 18 Jun 2021 03:55:13 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4G5rn7228Kz3xQG; Fri, 18 Jun 2021 09:55:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1624002907; bh=icQIR09LZr+XP49y5504qnhLdvZVXH/A1rfaIzKoZGU=; h=Subject:From:To:Cc:Date; b=F5FHR2SSQoykdRqTqiJEoGOlOng4/+ytwO3MZ8o+cQtRpCplittlw+9NciGaUzGa+ VTzyvZfFihvTXaKjBzb3lOhasqN7OQ7Xmm8pupk8f92ztxHwUaJWjc9V/KrBfDL3Op 6ItK2/7nLVIN6Ly+2dYMG/CaIp7+V2ZcITPgLrrM= Message-ID: <3f2046faab113a1cd5daeb3669505427e2d04b30.camel@student.tugraz.at> Subject: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file From: Leo Prikler To: 49082@debbugs.gnu.org Date: Fri, 18 Jun 2021 09:55:06 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49082 Cc: andrew@trop.in X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I appreciate this change, but how many rebuilds will it cause? It might need to go to core-updates. Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:21:47 2021 Received: (at 49082) by debbugs.gnu.org; 18 Jun 2021 16:21:47 +0000 Received: from localhost ([127.0.0.1]:57887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luHFb-0003J7-Mb for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:21:47 -0400 Received: from mail-lf1-f44.google.com ([209.85.167.44]:36467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luHFZ-0003Is-BR for 49082@debbugs.gnu.org; Fri, 18 Jun 2021 12:21:46 -0400 Received: by mail-lf1-f44.google.com with SMTP id d16so10120227lfn.3 for <49082@debbugs.gnu.org>; Fri, 18 Jun 2021 09:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=HoFS+Mc+4miIzOPX/xFWDhj9SOFcWdOxX8GW90e/uRg=; b=HCoW4lLgLo1a3/YulUd1qXi9f0rDRvgcd583tQSr1f3zOyoOA3vqTedFgztL7k/AZK bi8lk8VK5pBGCrDZI/WPxs67i4BCKExwHqp6vBh3GBKmS3FaHZgoAnqDMMAJI+Xm22jw ojbmB1QXj3tmEVjGxMD5wxHNUDIlNdDxaAQY3NQnT9B3/rVU01ViHMjOijTkOIJ10L/y tkxp9JmlfQIx71aOLMLkuKUuBhlFijROE9giX5rSpQCQZsyodp3W0dCdBxvxswDWMLNc KTxLAswoTPSO+ML6GBqIQIQGpUCIm9c06xmfIkPa8BNdVVT+9We5BCn1Y0naf75xXEa6 sVrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=HoFS+Mc+4miIzOPX/xFWDhj9SOFcWdOxX8GW90e/uRg=; b=QTJP327cp9rY6HcUATmXnCTQZVtKTVErFxLjOtLs3vq40XNCgqslAm7dS/AreTkwSa IbmTVq8m+39hYyT/d3AlunCXdco00yaO7HuPZFsS80RxbT2DG4sJX6GjLYOCPM5mR6tx WYv5Qste+0XRQrVvBimrUO001amIJIvnHpU5Ki2n4RvB4ySP4hfebxUMPGiTPRkskBdK Z0TDHHqhq55FjrZiyFUbidHKszR6KsQhHWV5XEppX+cqCpH+7VCbhZir82VTAd8wMsj1 NluE3LXO+7DzWCNNFfIW3kgD3g7kfh+9MyXTmbKdfYPkOn3O9PsFXcS+HM2woSQUdApi KNRQ== X-Gm-Message-State: AOAM530RaCHA0SCwZzm/yMLFWb3E2qOAulvpsFHXcTJ42Z7sbXl/H64U VpFPmnRf0uERZ8e+x34ewkuBC/MLl49CYg== X-Google-Smtp-Source: ABdhPJxeAXmsWwSelxc0j3NOzX/HxJuG9cuNgIBlTp3OSuxbwcIKtknhPeUuGivXeFOgqQDSjxKAxw== X-Received: by 2002:ac2:50d9:: with SMTP id h25mr3634363lfm.389.1624033298720; Fri, 18 Jun 2021 09:21:38 -0700 (PDT) Received: from ixy ([109.252.117.164]) by smtp.gmail.com with ESMTPSA id i30sm947165lfv.298.2021.06.18.09.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 09:21:38 -0700 (PDT) From: Andrew Tropin To: Leo Prikler , 49082@debbugs.gnu.org Subject: Re: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file In-Reply-To: <3f2046faab113a1cd5daeb3669505427e2d04b30.camel@student.tugraz.at> References: <3f2046faab113a1cd5daeb3669505427e2d04b30.camel@student.tugraz.at> Date: Fri, 18 Jun 2021 19:21:36 +0300 Message-ID: <87y2b72lf3.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49082 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leo Prikler writes: > I appreciate this change, but how many rebuilds will it cause? It might > need to go to core-updates. > Regards, Leo Not so many I suppose, AFAIK, it's not used by any packages, so it will cause rebuild only for users of 2 dozens of system services during system reconfigure, which should be quite cheap, because it's just string concatenation. Let me know if my understanding is wrong here. Anyway, I don't mind it going to core-updates if you think it's necessary. From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:39:49 2021 Received: (at 49082) by debbugs.gnu.org; 18 Jun 2021 16:39:49 +0000 Received: from localhost ([127.0.0.1]:57899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luHX3-0003ld-I5 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:39:49 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:23871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luHX1-0003lU-Tb for 49082@debbugs.gnu.org; Fri, 18 Jun 2021 12:39:48 -0400 Received: from [10.0.0.4] (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4G64QS1jRyz1DH91; Fri, 18 Jun 2021 18:39:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4G64QS1jRyz1DH91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1624034384; bh=8JBNPSbgXBseGIsSu5eTfYqGywmzLbZb+u7Nf0wfTfs=; h=Subject:From:To:Date:In-Reply-To:References:From; b=PV7TaoV5mu4EZ7rBPvG/JmsNMnHWjuPInn6D0iIa41yIRvKwErAcTk0b6/yseV/5u m7hq1dAVDlXeLyOQSyPRoOrp8HjHahsT7M36UlrFmttksf1kujXHB1whB++OBgojQg G9+RG1KgDZySs2h7pyM5bt4mmken56FJ1wEhcAIg= Message-ID: Subject: Re: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file From: Leo Prikler To: Andrew Tropin , 49082@debbugs.gnu.org Date: Fri, 18 Jun 2021 18:39:18 +0200 In-Reply-To: <87y2b72lf3.fsf@trop.in> References: <3f2046faab113a1cd5daeb3669505427e2d04b30.camel@student.tugraz.at> <87y2b72lf3.fsf@trop.in> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49082 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Am Freitag, den 18.06.2021, 19:21 +0300 schrieb Andrew Tropin: > Leo Prikler writes: > > > I appreciate this change, but how many rebuilds will it cause? It > > might > > need to go to core-updates. > > Regards, Leo > > Not so many I suppose, AFAIK, it's not used by any packages, so it > will > cause rebuild only for users of 2 dozens of system services during > system reconfigure, which should be quite cheap, because it's just > string concatenation. Let me know if my understanding is wrong here. > > Anyway, I don't mind it going to core-updates if you think it's > necessary. In that case it's probably good to go to master. One thing to note however, is that we typically bind %default-port- encoding throughout Guix. I suppose this doesn't work for stuff like mixed-text-file, since it's executed in a different context? From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:21:20 2021 Received: (at 49082) by debbugs.gnu.org; 18 Jun 2021 17:21:20 +0000 Received: from localhost ([127.0.0.1]:58129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luIBE-0004y4-Ab for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:21:20 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:43550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luIBB-0004xq-Vm for 49082@debbugs.gnu.org; Fri, 18 Jun 2021 13:21:18 -0400 Received: by mail-lf1-f47.google.com with SMTP id x24so17803580lfr.10 for <49082@debbugs.gnu.org>; Fri, 18 Jun 2021 10:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=Qk7ihrkFewRJiGJX8mrY1+OgvPgI7K1POgbFM5lKwcg=; b=aR2IVgLKF4AnZDn+c+jPbtcOvTOJa//zEYKvyJzVojfkCxhZ6xXFozDk5XuPPPKG03 XGG0zlycG8LY/rIjDVt2mL8FfHj0U6dHqPDBUqgkg5kGUULftNfGOFMUikxBPZlu5RMV rt4r1BBMdI2PYxwLvQl46CzfNAUz9gcQloagQRGdjvtkUCTVlkftqJLW+SaJlmsxVDp3 ZiS4L+Fv0c+K50sPL8lkZaur6zXg8Bk1Hh7QONDhJk1sYZ1a2wEpFSw9WSyIMY/IL9lc twH4UN29tZM7r2AgQeDXkNt1LFOQgFYClX6SH5UzROj4c+gNj7NZTNK6Ny825eZUtOfI Lwog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=Qk7ihrkFewRJiGJX8mrY1+OgvPgI7K1POgbFM5lKwcg=; b=Qqu8Uq8mxhyncUeHooTtknHtrs9i7X1/T47rFW8Xn60gBx+YJ26B8ut92z9uHEcZad UHf6yrU+xXydiWlvnitl1zofrhwzmqicOGA9eHN8BXxxYGXeK7hzdGQGcbD4TCrBOHcH 5rbAj7pUUg0UxFJaD3QyczoEHmzbArTgMGcXSRLoMp18k8uU/IVUYeknlceCFmPvTPEl /Twzp20vMNBChnWauwiQVmxcC1BXw0ziyEXxpyPs0tFdOsO9dapLvFuUJSJAKNhYQN74 lCuPTw2x3IjXonsdEuNezyuWs0Pdchhug1TlLGSCAwSgtLErdZoc/1fzFLGaI8ubcRLW Rtgw== X-Gm-Message-State: AOAM532X2sDOotJKRDF/6Imq0FBxW+Sy7WO+A9nsmNYXMhYwV6rfoy3p q7IM6aqYVeRLEeKkzATGZ6BzV+CnAVfb9w== X-Google-Smtp-Source: ABdhPJwWH+fP26TScqt7DzEZPKb6dHbtlhf7/W3xLqCFCqfafYQbDp6/K+HBHut+o33+Sro6VyXocA== X-Received: by 2002:ac2:53ac:: with SMTP id j12mr3982841lfh.198.1624036871501; Fri, 18 Jun 2021 10:21:11 -0700 (PDT) Received: from ixy ([109.252.117.164]) by smtp.gmail.com with ESMTPSA id u5sm964853lfs.196.2021.06.18.10.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 10:21:11 -0700 (PDT) From: Andrew Tropin To: Leo Prikler , 49082@debbugs.gnu.org Subject: Re: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file In-Reply-To: References: <3f2046faab113a1cd5daeb3669505427e2d04b30.camel@student.tugraz.at> <87y2b72lf3.fsf@trop.in> Date: Fri, 18 Jun 2021 20:21:09 +0300 Message-ID: <87pmwj2inu.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49082 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leo Prikler writes: > Am Freitag, den 18.06.2021, 19:21 +0300 schrieb Andrew Tropin: >> Leo Prikler writes: >> >> > I appreciate this change, but how many rebuilds will it cause? It >> > might >> > need to go to core-updates. >> > Regards, Leo >> >> Not so many I suppose, AFAIK, it's not used by any packages, so it >> will >> cause rebuild only for users of 2 dozens of system services during >> system reconfigure, which should be quite cheap, because it's just >> string concatenation. Let me know if my understanding is wrong here. >> >> Anyway, I don't mind it going to core-updates if you think it's >> necessary. > In that case it's probably good to go to master. Good! > One thing to note however, is that we typically bind %default-port- > encoding throughout Guix. I suppose this doesn't work for stuff like > mixed-text-file, since it's executed in a different context? Very probably. Have a good weekend! From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 23 17:39:34 2021 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#49082: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49082-done Cc: 49082-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 24 00:42:09 2021 Received: (at 49082-done) by debbugs.gnu.org; 24 Jun 2021 04:42:09 +0000 Received: from localhost ([127.0.0.1]:42189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwHBp-0002Rm-IQ for submit@debbugs.gnu.org; Thu, 24 Jun 2021 00:42:09 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:35730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwHBo-0002Qn-2x for 49082-done@debbugs.gnu.org; Thu, 24 Jun 2021 00:42:08 -0400 Received: by mail-lf1-f42.google.com with SMTP id u13so8010614lfk.2 for <49082-done@debbugs.gnu.org>; Wed, 23 Jun 2021 21:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=JmXdPhiY+IF4hfKHKLIKl0Zxbs2gT4rpoxfjuR6Gyuc=; b=pWfcVpvLr9dVrPjvq4aHjsTze67rqOkngOWhcaysqIlHocb9etz2qgLhXVIBunPN0C 7+eAqcHagCWzXqO9T0uKwhsnssXjNTP99+DQx1K2RL7BmNq++KxkaOvORhd+uIGRuUFh TAdqc3Y69vKbjarcqO2FJ1g4NEMSgNTUblaiVNznonslCKFr++pOZteTBQdLMx4jwK4B vojgT/zxl1Sz7rIPIIYLMU2uqr56xKLONiFhyrFtCoY/1hdoy/0wlzW9rUZruoLEXnAU 1sQns7rpgYsEU2G63Hrn5LW4OKzF+itHX20pCNZAwZpDys4aYe0R6uBGUnNTG/993AvZ NvCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=JmXdPhiY+IF4hfKHKLIKl0Zxbs2gT4rpoxfjuR6Gyuc=; b=ONuPdg8li8M1zl110fuCrbsu/DvDtaRQd8N9czcrBB8u2jdgGXEiRx5gCq3yWO977J ReumqQfhiYmU8CcIUzJ/hD56LNEz0oDabD25u2J3bwjpyaQArTcrmof82jybWbkFZy+k 2KzmuVX6Ndckdp4EN5hXPbvZKV0r7ZaZC36E/GfU0hZ5WOHBgXjcDfWiz/+x0ThT7I69 1WuNqH788sjh4kwLJA56EJCbIBGL28VkSVDxXBKRIgkV6FA08+PccFsPVDcQNe02ei7Q bnVTBdao4iL7NdkLjsATyvs7/3zYvilBtaDv1JUnwMhF2T/WjnpfiU04Q2YeHtVVPWgh WCdw== X-Gm-Message-State: AOAM530x7aqp92sbi9DBqNMCmeh90uvs0FZsnvC0tq3DtXMTDxMAlktV AS5Lih6iPnZn48OUSIOUObUTAN5ioQaMwQ== X-Google-Smtp-Source: ABdhPJwpJEwG+EHd/pBD1UUYxMEgPvRGX/gnDHsuyp6ZvNT/V40xdTkwL8R4jJsRTkyqVFw7HSnw/w== X-Received: by 2002:a05:6512:1381:: with SMTP id p1mr2335325lfa.367.1624509721639; Wed, 23 Jun 2021 21:42:01 -0700 (PDT) Received: from ixy ([109.252.117.164]) by smtp.gmail.com with ESMTPSA id u3sm97791lft.236.2021.06.23.21.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 21:42:00 -0700 (PDT) From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#49082: [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file In-Reply-To: <875yy4uupe.fsf@gnu.org> References: <87bl836bdy.fsf@trop.in> <875yy4uupe.fsf@gnu.org> Date: Thu, 24 Jun 2021 07:41:58 +0300 Message-ID: <87a6nfoovd.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49082-done Cc: 49082-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Hi, > > Andrew Tropin skribis: > >> guix/gexp.scm (mixed-text-file): It's necessary because if some UTF-8 sy= mbols >> appear in configuration, resulting file in the store will contain ? inst= ead of >> it. > > Good catch! Applied as 1f3d7b45349d43e5cc02594083e0cd44ef730992. Thank you very much!) > 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 rig= ht > encoding from the start). In this case it doesn=E2=80=99t matter much th= ough. Got it, I thought Leo meant to wrap (mixed-text-file ...) into parametrize, which probably won't work, because gexp will be avaluated in different environment. Sorry for missunderstanding!) Leo, Ludo, thank you for explanation! > Thank you! > > Ludo=E2=80=99. From unknown Wed Jun 18 23:09:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Jul 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator