unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alexander Miller <alexanderm@web.de>
Cc: 45342@debbugs.gnu.org
Subject: bug#45342: 28.0.50; Native compiled function returns raw bytes, not string
Date: Sun, 20 Dec 2020 19:56:02 +0200	[thread overview]
Message-ID: <83r1nks6od.fsf@gnu.org> (raw)
In-Reply-To: <b6f2922c-00e7-7bf3-84eb-92c347450343@web.de> (message from Alexander Miller on Sun, 20 Dec 2020 18:36:46 +0100)

> From: Alexander Miller <alexanderm@web.de>
> Date: Sun, 20 Dec 2020 18:36:46 +0100
> 
> In my config I have the following function that is used to prettify my
> mode-line (the actual version is pure and side-effect-free and inlined,
> but that does not seem to have any effect here):
> 
> (defun f (n)
>    (pcase n
>      (1 " ➊") (2 " ➋") (3 " ➌") (4 " ➍") (5 " ➎") (6 " ➏")
>      (7 " ➐") (8 " ➑") (9 " ➒") (10 " ➓") (_ "")))
> 
> When native compiled it appears to return raw bytes instead of the
> unicode symbols, for example I am seeing \342\236\212 instead of ➊.

\342\236\212 is the UTF-8 encoding of ➊.  Which probably means the
native-compiled function returns a unibyte string instead of a
multibyte string, for some reason.





  reply	other threads:[~2020-12-20 17:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20 17:36 bug#45342: 28.0.50; Native compiled function returns raw bytes, not string Alexander Miller
2020-12-20 17:56 ` Eli Zaretskii [this message]
2020-12-20 20:24 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-21 13:45 ` Alexander Miller
2020-12-21 15:34   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-21 19:36 ` bug#45342: closed (Re: bug#45342: 28.0.50; Native compiled function returns raw bytes, not string) Alexander Miller
2020-12-21 20:01   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=83r1nks6od.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=45342@debbugs.gnu.org \
    --cc=alexanderm@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).