unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: 56344@debbugs.gnu.org
Subject: bug#56344: 28.1; cannot copy-paste string with utf-8 letters (i.e. ²): "Non-ASCII string must be encoded in advance"
Date: Sat, 02 Jul 2022 09:03:04 +0300	[thread overview]
Message-ID: <83sfnkcaqv.fsf@gnu.org> (raw)
In-Reply-To: <87sfnkwkyk.fsf@web.de> (arne_bab@web.de)

> From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
> Date: Fri, 01 Jul 2022 23:53:02 +0200
> 
> I have a file that contains text with unicote:
> 
> - 12 ::
>   - Minerale finden (bis Distanz 10cm x 10 pro 3 Diff)
>   - Durchgang finden (10m x 10 pro 3 Diff)
>   - Steinwachstum (1 Liter x 10 pro 3 Diff, keine Edelsteine, sondern Grundgestein)
>   - Durchschlagend (Schaden von Geschoss oder Waffe + 1 pro 3 Diff für eine Handlung, Berührung)
> 
> 
> If I copy that (M-w) and try to paste it into a text field in the icecat
> browser (firefox derivative), I get the error message *in Emacs*:
> 
> Non-ASCII string must be encoded in advance: "- 12 ::
>   - Minerale finden (bis Distanz 10cm x 10 pro 3 Diff)
>   - Durchgang finden (10m x 10 pro 3 Diff)
>   - Steinwachstum (1 Liter x 10 pro 3 Diff, keine Edelsteine, sondern Grundgestein)
>   - Durchschlagend (Schaden von Geschoss oder Waffe + 1 pro 3 Diff f\374r eine Handlung, Ber\374hrung)"

Does this happen in "emacs -Q"?  If it does, can you run Emacs under
GDB, set a breakpoint in xselect.c here, on the line that calls
signal_error:

  else if (STRINGP (obj))
    {
      if (SCHARS (obj) < SBYTES (obj))
	/* OBJ is a multibyte string containing a non-ASCII char.  */
	signal_error ("Non-ASCII string must be encoded in advance", obj);

(it should be line 1731 of xselect.c)?  Then repeat the recipe, and
when the breakpoint breaks, produce a backtrace, like this:

  (gdb) thread apply all bt

and post it here.

Thanks.





  reply	other threads:[~2022-07-02  6:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 21:53 bug#56344: 28.1; cannot copy-paste string with utf-8 letters (i.e. ²): "Non-ASCII string must be encoded in advance" Dr. Arne Babenhauserheide
2022-07-02  6:03 ` Eli Zaretskii [this message]
2022-07-02  8:07   ` Dr. Arne Babenhauserheide
2022-07-03 17:59     ` Eli Zaretskii
2022-08-02 11:00       ` Lars Ingebrigtsen
     [not found]         ` <87bkt224s0.fsf@web.de>
     [not found]           ` <87edw4s8k9.fsf@web.de>
2022-09-22 10:42             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sfnkcaqv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=56344@debbugs.gnu.org \
    --cc=arne_bab@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).