Hello,

Guile currently uses libunistring’s ‘u32_conv_from_encoding’ when
reading text from an input port whose encoding isn’t Latin-1 (similarly
when writing to output ports.)

An issue with that is that escaping non-representable characters is
handled by libunistring, with a syntax different from the one we’d like
(Guile or R6RS string escapes.)  So
‘scm_i_unistring_escapes_to_{guile,r6rs}_escapes’ kludgely attempt to
substitute the right escapes.

The problems with this approach are discussed in the thread at:

  http://lists.gnu.org/archive/html/bug-libunistring/2010-09/msg00004.html

The conclusion is that we’d better use raw ‘iconv’ calls in such
cases...

Ludo’.


Reply via email to