From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4KPFEF98JWdmAQAA62LTzQ:P1 (envelope-from ) for ; Sat, 02 Nov 2024 01:11:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 4KPFEF98JWdmAQAA62LTzQ (envelope-from ) for ; Sat, 02 Nov 2024 02:11:59 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=CM3UZO+B; dkim=fail ("headers rsa verify failed") header.d=xn--no-cja.eu header.s=ds202402 header.b=TfYxjVIG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-mumi-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-mumi-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730509919; a=rsa-sha256; cv=none; b=IT/CkgglV4MZwhbPap1V3p1BZovpRp/VxZZOp8X23VZdAYvhvsRiWAMxd+tCl3I6xPnM1t IhQek8Cm1Ktx3acrXowXb7FUTFlzcRLfc2BPEnNqYOG5H+WlWKw/wPiz/kdfJJgTpV3S+9 dl8vxudbJcrIYxqRcuxrXDJLvyhrp7QLQhoPWrxMOYe7bmZPALhhXxQwlYjIcwehJuieu2 WZ4Z5kgt4keDGBKelNm2zEpjgh0VRw5CSkGCmGep5dRlQfGzXV34mbLBSJnz1elSk+45tC Pm1FNEa3Xxh3s/TXYqgomY854sVBFXOOMG2CdBxP3cL6929Hs/gHmai9cmk7JQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=CM3UZO+B; dkim=fail ("headers rsa verify failed") header.d=xn--no-cja.eu header.s=ds202402 header.b=TfYxjVIG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-mumi-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-mumi-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730509919; h=from:from:sender:sender:reply-to: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-cc: 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:dkim-signature; bh=kYgaIN8Zp/rvIZcSEr61/L3RsHgEN3AoHGYcFqtOgeM=; b=qHFV2Gk/10Dwf+2vYdGb3xMpys9a9KImK9gTlO95onCySM/MD17NTfzPhR7vd1OS3IjzYa eaQw8IuWlYvk0WmJeRJsVp6WA/qoPDQqciocQTroPk2pbLJmK6Fi5yfZ6beI45oZkhsCOS jNWNTyMnQvcMONuc3zQfxsFKFBI6fjMZgS+3VNhsYPaF3bskZywKzbl34Q4NUu1OFvuy2P nLhRPAGSgFyDUeqiQUbMJNz5+lwrNws8TklyeLbTlgqAyP9cil3+VEaXXymkFCfriq5OYs A0hUAIZElpqlt5/qRaiqnkgVnxIMi3HanWY+Zqplg9Ybab9i4vSZisiuOiltUA== 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 C260218739 for ; Sat, 02 Nov 2024 02:11:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t72gD-0006kc-G7; Fri, 01 Nov 2024 21:11:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t71fW-0008NQ-MR for bug-mumi@gnu.org; Fri, 01 Nov 2024 20:07:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t71fW-0001NM-EB for bug-mumi@gnu.org; Fri, 01 Nov 2024 20:07:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=kYgaIN8Zp/rvIZcSEr61/L3RsHgEN3AoHGYcFqtOgeM=; b=CM3UZO+BYtPGFx59yDSlOxYRA5ELMIXiIF5KDAcFN2e3zx6HUtgmSHuv/I2fRIvRiB0TlVnci3Wx3Tt8TM4bOvd1s5DDhslU/NvaFjWlzDEExfwHMMjMu7Lf2ZfqBIt1SwVtm/EUZD1UMhTdimWFlUTKixWHhrucb8g2cH9es4NNEacCeYpOfsaNh8YKxZDygVW1Q9u/icPVtWkkCCP7dY11FfQC0iL7doMyqpIyfDvNzsdiwLqYCn5YVpV0nye+iQ6754jV+EkXZRVj5zqansZuiMeCmmImvrjA+C7lRBWrdw9/129Qs+s/i7PoLsWIRuy9mc2J4NscvpA98TaU5w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t71fS-0003jd-Fq; Fri, 01 Nov 2024 20:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#69381: [PATCH] web: Use string to avoid losing unicode characters. References: In-Reply-To: Resent-From: noe@xn--no-cja.eu Original-Sender: "Debbugs-submit" Resent-CC: ~@wolfsden.cz, felix.lechner@lease-up.com, bug-mumi@gnu.org Resent-Date: Sat, 02 Nov 2024 00:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69381 X-GNU-PR-Package: mumi X-GNU-PR-Keywords: patch To: 69381@debbugs.gnu.org Cc: =?UTF-8?Q?No=C3=A9?= Lopez , Tomas Volf <~@wolfsden.cz>, Felix Lechner X-Debbugs-Original-Xcc: Tomas Volf <~@wolfsden.cz>, Felix Lechner Received: via spool by 69381-submit@debbugs.gnu.org id=B69381.173050599814342 (code B ref 69381); Sat, 02 Nov 2024 00:07:02 +0000 Received: (at 69381) by debbugs.gnu.org; 2 Nov 2024 00:06:38 +0000 Received: from localhost ([127.0.0.1]:52495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t71f4-0003jG-2l for submit@debbugs.gnu.org; Fri, 01 Nov 2024 20:06:38 -0400 Received: from smtp.domeneshop.no ([194.63.252.55]:56289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t71f0-0003j8-NH for 69381@debbugs.gnu.org; Fri, 01 Nov 2024 20:06:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xn--no-cja.eu; s=ds202402; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:Cc:To:From:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kYgaIN8Zp/rvIZcSEr61/L3RsHgEN3AoHGYcFqtOgeM=; b=TfYxjVIGKgwdjzGm1KfDGA3xLP amPJ6jeUSfCpjWMNHo3bBGBZhoBcIGFbMbj5ow75KuVW50xHMNJwcnit7V7cIKmV6SrVPF/2hHjwo eYkEt1ODpfAzvP70TGaAQ1ZS59EX33vqum5VwB3JRei/oosZUmm3Ea2SuJBeX+4+t71ASZvm1NU0k A448JOSzMV/V5Jmx5BrG+sgytg4TOxilJISolHIx6normDeK4OcW7Ak+EHwckMgW4MiPCoDXr0SWR LBBXuGZCHqO5SfWq7AcFTDg7hCoKNfiXmcuA/wQr1p1AqZb+6W6PFZymHGJ4RlnG5Drz2Q+Ic/E6O 2afwz/FQ==; Received: from [2a01:e0a:990:a960:b4f3:8f44:ec4:5af5] (port=54428 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t71et-005jNZ-W8; Sat, 02 Nov 2024 01:06:28 +0100 Date: Sat, 2 Nov 2024 01:07:28 +0100 Message-ID: <20241102000730.3330-1-noe@xn--no-cja.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Fri, 01 Nov 2024 21:11:51 -0400 X-BeenThere: bug-mumi@gnu.org List-Id: "Bug reports for GNU Guix Mumi." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: noe@xn--no-cja.eu X-ACL-Warn: , noe--- via Bug-mumi From: noe--- via Bug-mumi via "Bug reports for GNU Guix Mumi." Errors-To: bug-mumi-bounces+larch=yhetil.org@gnu.org Sender: bug-mumi-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.05 X-Spam-Score: 2.05 X-Migadu-Queue-Id: C260218739 X-Migadu-Scanner: mx12.migadu.com X-TUID: fXCydlPX2LW6 From: Noé Lopez I don’t really understand why the unicode characters were lost in the first place, maybe something in the sanitize-response of (fibers web server)? Specifically, strings and procedures don’t take the same path there. * mumi/web/render.scm (render-html): Return string instead of procedure. --- mumi/web/render.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mumi/web/render.scm b/mumi/web/render.scm index 168f3bc..c28a26f 100644 --- a/mumi/web/render.scm +++ b/mumi/web/render.scm @@ -105,8 +105,9 @@ (define* (render-html sxml #:key (extra-headers '())) (values (append extra-headers '((content-type . (text/html (charset . "utf-8"))))) - (lambda (port) - (sxml->html sxml port)))) + (call-with-output-string + (lambda (port) + (sxml->html sxml port))))) (define (render-json json) (values '((content-type . (application/json))) -- 2.46.0