mumi does not correctly display (some?) non-ascii characters

  • Open
  • quality assurance status badge
Details
2 participants
  • Felix Lechner
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
Blocked by
T
T
Tomas Volf wrote on 25 Feb 14:04 +0100
(address . bug-mumi@gnu.org)
Zds6yhPkZ0Id6SAT@ws
Hi,

when I compare mumi page[0] with debbugs page[1], the from field displays "???"
in mumi, but "???" in debbugs.

Have a nice day,
Tomas Volf


--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmXbOsoACgkQL7/ufbZ/
wanbRxAApKKRUtO29oBTdcr2QO99NNsvW2cq5VWAm4iAKEaThMzZneIT5ljX7WHi
qMjAJq4wBJMzRiZpym51Z/ZVJQ4l7AW7fZmzmjcMp7f66WxG1Ob6B5815lE4Iyyv
8Zo+3UBBLOuCfk0zXgWiO/5DhL0XeLs2FqHvdKOlfI++eNjPwuTLY8wxyk1oB31Z
njJyqXZdpxKa4Z54tyv2JIs2FWAptYAR2MXFTmoEmV4RanNDBXOvYfc84XBFaGE0
ObhK0Nn0pjxmZjzR7XIVvnm4Q6krpmSGd/Pqhe4JTLoeFnl2QV27fKExxGtKw8fm
fR1HTPBQ5+XvfiJ4atVhYsoE7gAH2KW+Db2tm0Wp0S3kqibVndQF2jjZxkuaYvqG
Rdqi4krCZMkDzP8i9fapXyJ9FPo60qYHttpl98HLMt/utL2iNV6sDULH/cv0senR
P1Pdk4n/NzPnbiDskkVGc+FkoZVTkhFEDJbrfAQ8GF7hmktMpXZFpbP0BypMVKz6
aoT6czUisgSXzWtT+rm3LMgjIqPd+JHm9IeEDsZ6KCO7W5mpqwXGK0qB7x6OgJ3S
B33GiqattHNeWlWkGOEs/Ptz9AbWbX8oUaiMZ7UhAyBzCpnaZtXbU9CHf6k3MFGY
z1PgvDtqXfqkMfVNGzzI3NLUjqdDtZOm3EUN5l1WE57Yhze7ESI=
=2/8p
-----END PGP SIGNATURE-----


F
F
Felix Lechner wrote on 15 May 01:12 +0200
[PATCH] Convert HTML to UTF-8 ourselves. (Closes: #69381)
(address . 69381@patchwise.org)
20240514231249.18303-1-felix.lechner@lease-up.com
This fixes a host of encoding issues in Mumi, including the diff
problems that are not mentioned in the bug. An example is here:


The procedure version may one day be more efficient but does not work.
Based on comments in the Guile source code, the procedure style may
one day enable more advanced response formats. The author is unclear
as to why the procedure does not work. There may be a complex
interaction involving the response headers.

A preview of this code is live at patchwise.org.

The solution of this bug may depend on the patch in Bug#70907. This
patch furthermore depends on the patch in Bug#70906, but the solution
of the bug may not.
---
mumi/web/render.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Toggle diff (32 lines)
diff --git a/mumi/web/render.scm b/mumi/web/render.scm
index 316ca4c..9b16f8d 100644
--- a/mumi/web/render.scm
+++ b/mumi/web/render.scm
@@ -28,6 +28,7 @@
#:use-module ((ice-9 textual-ports)
#:select (get-string-all put-string))
#:use-module (ice-9 match)
+ #:use-module (rnrs bytevectors)
#:use-module (web http)
#:use-module (web request)
#:use-module (web response)
@@ -104,13 +105,13 @@
(define* (render-html sxml #:key (extra-headers '()))
(values (append extra-headers
'((content-type . (text/html (charset . "utf-8")))))
- (lambda (port)
- (sxml->html sxml port))))
+ (string->utf8
+ (sxml->html-string sxml))))
(define (render-json json)
(values '((content-type . (application/json (charset . "utf-8"))))
- (lambda (port)
- (scm->json json port))))
+ (string->utf8
+ (scm->json-string json))))
(define (not-found uri)
(values (build-response #:code 404)
--
2.41.0
F
F
Felix Lechner wrote on 15 May 01:15 +0200
(no subject)
(address . control@patchwise.org)
87a5ksvvcc.fsf@lease-up.com
block 69381 by 70906 70907
tags 69381 + patch
thanks
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69381@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69381
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch