chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1374: `display' issue with UTF-8


From: Chicken Trac
Subject: [Chicken-janitors] #1374: `display' issue with UTF-8
Date: Sat, 27 May 2017 21:38:00 -0000

#1374: `display' issue with UTF-8
----------------------------------------+--------------------------------
 Reporter:  mario                       |                 Owner:
     Type:  defect                      |                Status:  new
 Priority:  major                       |             Milestone:  someday
Component:  core libraries              |               Version:  4.12.0
 Keywords:  display, ##sys#print, utf8  |  Estimated difficulty:
----------------------------------------+--------------------------------
 I received a bug report against awful ([[https://github.com/mario-
 goulart/awful/issues/5]]), but the issue seems to be related to CHICKEN.

 Here's a smaller test case to illustrate the problem:

 {{{
 $ cat test.scm

 (cond-expand
   (chicken (use utf8))
   (else #f))

 (let ((chars (string->list "出")))
   (display "<html><head><meta charset=\"utf-8\"/></head>")
   (display chars)
   (display "<br>")
   (display "(")
   (display (car chars))
   (display ")")
   (display "</html>"))
 }}}

 To see the problem:

 {{{
 $ csi -s test.scm > chicken-out.html
 $ firefox chicken-out.html
 }}}

 It seems that {{{display}}} is messing up at printing the list containing
 the UTF-8 char.

 Gauche does the right thing:

 {{{
 $ gosh test.scm > gauche-out.html
 $ firefox gauche-out.html
 }}}

 The two output files differ, of course:

 {{{
 $ cmp gauche-out.html chicken-out.html
 gauche-out.html chicken-out.html differ: byte 44, line 1
 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1374>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]