GNU bug report logs - #56344
28.1; cannot copy-paste string with utf-8 letters (i.e. ²): "Non-ASCII string must be encoded in advance"

Previous Next

Package: emacs;

Reported by: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>

Date: Fri, 1 Jul 2022 22:03:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 56344 <at> debbugs.gnu.org
Subject: Re: bug#56344: 28.1; cannot copy-paste string with utf-8 letters
 (i.e. ²): "Non-ASCII string must be encoded in
 advance"
Date: Thu, 22 Sep 2022 12:42:27 +0200
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de> writes:

>> I have not yet found what in my config could be causing it, but I am
>> still searching.
>
> I finally found the reason for the problem:
> In org-custom-link-completion.el I had defined string-replace as:
>
> (defun string-replace (this withthat in)
>   "replace THIS with WITHTHAT' in the string IN"
>   (with-temp-buffer
>     (insert in)
>     (goto-char (point-min))
>     (replace-string this withthat)
>     (buffer-substring (point-min) (point-max))))
>
> But this overwrote an internal function.
>
> After removing this (and its usages in my code replaced by plain
> replace-regexp-in-string) my problems with encoding are gone.
>
> So this can now be closed as "user broke emacs with config" …

Ah, I see.  :-)

> Thank you for your patience!

No problem.




This bug report was last modified 2 years and 241 days ago.

Previous Next


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