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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30095 in the body.
You can then email your comments to 30095 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#30095; Package guix. (Sat, 13 Jan 2018 02:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to nee <nee <at> cock.li>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 13 Jan 2018 02:26:02 GMT) Full text and rfc822 format available.

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

From: nee <nee <at> cock.li>
To: bug-guix <at> gnu.org
Subject: substitute* decoding-error
Date: Sat, 13 Jan 2018 03:25:35 +0100
[Message part 1 (text/plain, inline)]
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?
I also included a sed workaround which can be uncommented and works
perfectly fine, so the itself file is not too broken to be edited and
this is a bug with substitute*.

The file in question is: src/main.cc from
https://sourceforge.net/projects/eureka-editor/files/Eureka/1.21/eureka-121-source.tar.gz/download

I tested this on the latest guix master. git log says:

commit 7c0926ea7c6f0d0fa291251017704dfb6fb21924 (origin/master,
origin/HEAD, eureka)
Author: Ludovic Courtès <ludo <at> gnu.org>
Date:   Sat Jan 13 00:57:52 2018 +0100


[0001-demonstrate-substitute-bug-in-eureka-package.patch (text/x-patch, attachment)]
[substitute-error.log (text/x-log, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#30095; Package guix. (Sat, 13 Jan 2018 21:36:02 GMT) Full text and rfc822 format available.

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’.
  




Information forwarded to bug-guix <at> gnu.org:
bug#30095; Package guix. (Sun, 14 Jan 2018 16:37:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: nee <nee <at> cock.li>
Cc: 30095 <at> debbugs.gnu.org
Subject: Re: bug#30095: substitute* decoding-error
Date: Sat, 13 Jan 2018 13:49:12 +0100
Hi nee,

> 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?

You could try something like this:

   ;; This file is ISO-8859-1 encoded.
   (with-fluids ((%default-port-encoding #f))
     (substitute* "the/file"
       (("this") "that")))

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Thu, 14 May 2020 12:47:01 GMT) Full text and rfc822 format available.

Notification sent to nee <nee <at> cock.li>:
bug acknowledged by developer. (Thu, 14 May 2020 12:47:01 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 30095-done <at> debbugs.gnu.org
Subject: substitute* decoding-error
Date: Thu, 14 May 2020 14:46:10 +0200
I’m closing this as eureka-editor has already been added to the Guix
package collection.

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Jun 2020 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 290 days ago.

Previous Next


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