From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45342: 28.0.50; Native compiled function returns raw bytes, not string Date: Sun, 20 Dec 2020 19:56:02 +0200 Message-ID: <83r1nks6od.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2851"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45342@debbugs.gnu.org To: Alexander Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 20 18:57:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kr2xI-0000c4-Oh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Dec 2020 18:57:16 +0100 Original-Received: from localhost ([::1]:39266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr2xH-0005Hv-RF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Dec 2020 12:57:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr2x4-0005Hp-4a for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2020 12:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kr2x3-0004B3-SK for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2020 12:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kr2x3-0004eC-Ph for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2020 12:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Dec 2020 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45342 X-GNU-PR-Package: emacs Original-Received: via spool by 45342-submit@debbugs.gnu.org id=B45342.160848698617818 (code B ref 45342); Sun, 20 Dec 2020 17:57:01 +0000 Original-Received: (at 45342) by debbugs.gnu.org; 20 Dec 2020 17:56:26 +0000 Original-Received: from localhost ([127.0.0.1]:45558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2wT-0004dK-SH for submit@debbugs.gnu.org; Sun, 20 Dec 2020 12:56:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kr2wS-0004d8-Oi for 45342@debbugs.gnu.org; Sun, 20 Dec 2020 12:56:24 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50059) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr2wN-00041I-6g; Sun, 20 Dec 2020 12:56:19 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3881 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kr2wM-0008AP-I6; Sun, 20 Dec 2020 12:56:18 -0500 In-Reply-To: (message from Alexander Miller on Sun, 20 Dec 2020 18:36:46 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196486 Archived-At: > From: Alexander Miller > 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.