GNU bug report logs - #30095
substitute* decoding-error

Previous Next

Package: guix;

Reported by: nee <nee <at> cock.li>

Date: Sat, 13 Jan 2018 02:26:01 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 30095 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: nee <nee <at> cock.li>
Cc: 30095 <at> debbugs.gnu.org
Subject: Re: bug#30095: substitute* decoding-error
Date: Sat, 13 Jan 2018 22:35:27 +0100
Hi,

nee <nee <at> cock.li> skribis:

> Hello, attached is a package definition that fails because substitute*
> throws an error. The file I try to substitute* on has some names with
> special signs like ë and é that might be related?

Most likely the file in question is not UTF-8-encoded, whereas
‘substitute*’ defaults to UTF-8.

If it’s Latin-1 (aka. ISO-8859-1), you can do:

  (with-fluids ((%default-port-encoding "ISO-8859-1"))
    (substitute* …))

which should solve the problem (there are a few examples of that in the
package definitions.)

HTH!

Ludo’.
  




This bug report was last modified 5 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.