From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4I1ENAUizGDIcQAAgWs5BA (envelope-from ) for ; Fri, 18 Jun 2021 06:33:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uJVAMAUizGC5JgAA1q6Kng (envelope-from ) for ; Fri, 18 Jun 2021 04:33: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 5CD83244D0 for ; Fri, 18 Jun 2021 06:33:09 +0200 (CEST) Received: from localhost ([::1]:59776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu6Bn-0001gi-Tr for larch@yhetil.org; Fri, 18 Jun 2021 00:33:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu6Bi-0001gL-I7 for guix-patches@gnu.org; Fri, 18 Jun 2021 00:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lu6Bi-0002we-Am for guix-patches@gnu.org; Fri, 18 Jun 2021 00:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lu6Bi-0002Nz-4n for guix-patches@gnu.org; Fri, 18 Jun 2021 00:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49082] [PATCH] guix: gexp: Make UTF-8 a default port encoding in mixed-text-file Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Jun 2021 04:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49082 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49082@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16239907589140 (code B ref -1); Fri, 18 Jun 2021 04:33:01 +0000 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 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-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=1623990789; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=ZT7O4JeZ7Sc4HhbU6/yh9pRSeRvh8Rx7qWXJMjx8WR4=; b=hjxQTk1MoUYd5YwppvFhOD3DMzZ/jN/1chCsToMAEm5T91MdYDGIENMD4gsLiJUPMhPqcb czJvsDV/NsxHOceCAIf5zAZumI2Knj9pdF6NWYasNhFYL3BtcW0aR8dEwFTp0elxxHqrNY ZVOcLsOu0isvkDBn6Yh8H3tDrxdqlXG4MvDuM4O5Q50KvBkf34KYALrKeX6GAQfPX9UV4s 8Q88/WfghSUoSpkrIfFXaTrLmalCEgDVXEQRUKvrZHFDzBzFK9OgMD7oqVIlhKwpFwXJXX XCi5jLBKV364LYEyAJKeYgiyStQse+rZiwmkO30sF2SAafGrCLcy9rMpq2aSCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623990789; a=rsa-sha256; cv=none; b=truwniD2BVFAGL68rScHRzLprNh3O41NU33eD7Wq5dXCV6uPtnHkbSMJK+NKrHGXF6NMSv LdtVT1rcnyLiqcPEcd3XMVh9jW9L8kUCAfUuTaR5lyW8i0UM8z6a4fx4IBt9ZAlzJ+V20S 8+g0teoykFhZ6Pw7wEfsipeajZkrEJUnLVdl17z3iWFnEPG7sduO8Tx0qVoeSLjrJEEQF1 +fiTmKIqJ+oIft707/ui8gAIyCqDoAarTvEZb9rqDzsiVxlAYOGl7Z546jiqX+f63QKjCl zVW1okTyG62IItYWScdFho5GJUAMVS5R0ZRALxHTmsTF/5EW8j5dMO6U9VAE6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=kGkBRz+6; dmarc=none; 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: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=kGkBRz+6; dmarc=none; 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: 5CD83244D0 X-Spam-Score: -1.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4IcNFgBFlweA 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