bug-guile
[Top][All Lists]
Advanced

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

bug#11197: problems with string ports and unicode


From: Mark H Weaver
Subject: bug#11197: problems with string ports and unicode
Date: Wed, 11 Apr 2012 12:08:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

address@hidden (Ludovic Courtès) writes:
> It may be that your string ports are created with a non-Unicode-capable
> encoding.  Try something like:
>
>   (define p
>     (with-fluids ((%default-port-encoding "UTF-8"))
>       (open-input-string "čtyří")))

IMO, this should not be needed.  Port encodings should only be relevant
when reading from ports involving byte strings, such as file ports or
socket ports.  The encoding used by Scheme strings is a purely internal
matter; from the user's perspective, Scheme strings are simply a
sequence of Unicode code points.

What _is_ needed is a file coding declaration near the top of the source
file, e.g. "coding: utf-8" (see "Character Encoding of Source Files" in
the manual).  I tried that and it still fails for me.

I think this is a genuine bug.

     Mark





reply via email to

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