From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Why does using aset sometimes output raw bytes? Date: Sun, 09 Dec 2018 16:16:15 +0100 Message-ID: <87h8fmohmo.fsf@gmx.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1544368486 23464 195.159.176.226 (9 Dec 2018 15:14:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2018 15:14:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 16:14:42 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gW0n2-0005y3-Nz for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 16:14:40 +0100 Original-Received: from localhost ([::1]:55727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW0p9-0006Xk-HC for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 10:16:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW0oh-0006Xf-Vb for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 10:16:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW0oc-0008Cs-VF for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 10:16:23 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:35283) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gW0oc-0008CH-M5 for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 10:16:18 -0500 Original-Received: from rosalinde ([88.74.23.82]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MK0ur-1gUdlt3Luv-001RPX for ; Sun, 09 Dec 2018 16:16:16 +0100 X-Provags-ID: V03:K1:HDHj4WXJO3G23pM9pkjbQfPN4PYtV9olXBmKfvt7qPgE8NkIRCu QS1kDv8PrVVJS6k53erwtKik1fG58vWfCKbyp+bLWqEHLEjTMkowRGKYg0aURN5pDHeMkoR 611aX51maBni0mZQqQ91j4BJV9IB10BJWEEGM2Tp1675o77ZRdAVJrEqp12uTgNOhXoWIZe BVGdEm5EfbO0ne1cc2O+A== X-UI-Out-Filterresults: notjunk:1;V03:K0:Sf+5Pxz1JnM=:UzjSVkD1PVWTXd6IRcfjVX MDaIIvtFohUt5gageSTT3Es9MVTONoKcyMKmlys7+DnLoSbCYi4ewqdP4UWfcHu3vsh6mjRnZ sOlHOewyO5inV69DkM6gY0neFZmZDpojdZXhWf+XZjG9FWnKI2tq2fSoCTepgXUQTIem2c87W H7wZiS7ZdnuzJONLtw7aJhHca1y5c7+u4M1HvG3TbCry8AGqns6npZ+Q4PfbTtdC8cNmQg/PZ sBxhbEB6Be5zHqbyWVrMeldExCaIgo8x6GSzikEhro+WaFmNezxlFg3hl3sI11sUsZjWA+JHB jx9I66vYmVROUPEKbnS8JJg6lQFT0RgKDlUNZGq9tDNjEC6bk1fvWq33/ghSznKAti2/AD4Le GOEmg4cDcrCzIQe6EUqdVaeHDP0ZiudXnw0qNme686u4Hvj8+mge6FBiK0tq/1kjQ+KPevatF Hhbe1E5IMPqgpBw+etlW3IBgYjMKt55aprklc0mkmD0SaooNGv3lGm8/GLxqfEl1F8B9a7IIn C6aOge7Mvdgp7vPbGGo02qPtw88v/GEQYt06Q3610hXky6VO8gDgQpBlCTi1on1d/SCH0t9Uk KqQNC8FByudZg7Z+L/6NmMnPmsNguT2yxHUR78dYI1TxISG+IL7wIP41tScsarsGC4iTqIzAl vhkFTqWPCwmlwePCS7GuRPgxPb/30QYU7KkgNYxRYIRfkH+pLDhvJzGcPYfuXdeAP1NXfalWW 5yo7EwogzPQl2Pn+/U9OpB1qz2jIBMfM2wLo3gae8BcmABNdRLyMhXNP6cQIpi8SwT2z21la X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118937 Archived-At: When I use aset to change characters in a string to certain non-ascii characters and insert the result into a buffer, the non-ascii characters are displayed as raw bytes. This only happens with certain non-ascii characters, and also only if the string being altered is bound to a variable and aset takes that variable as argument; if aset operates directly on the string, those same non-ascii characters are inserted as the expected characters. To reproduce, start emacs with -Q and evaluate the following sexp: (let ((s0 "aous") (s1 "=C3=A4=C3=B6=C3=BC=C3=9F") (s2 "sdfg") (s3 "=C5=BF=C3=B0=C4=91=C5=8B")) (dolist (s `((,s0 . ,s1) (,s2 . ,s3))) (dotimes (i 4) (aset (car s) i (aref (cdr s) i)))) (insert s0 s2 "\n") (dotimes (i 4) (insert (aset "aous" i (aref "=C3=A4=C3=B6=C3=BC=C3=9F" i)))) (dotimes (i 4) (insert (aset "sdfg" i (aref "=C5=BF=C3=B0=C4=91=C5=8B" i))))) Here's what gets inserted into the buffer (I've represented the raw bytes by ascii strings to make sure they're readable here): \344\366\374\337=C5=BF=C3=B0=C4=91=C5=8B =C3=A4=C3=B6=C3=BC=C3=9F=C5=BF=C3=B0=C4=91=C5=8B Is this expected, and if so, what's the explanation, i.e., why does this happen with some non-ascii characters (e.g. =C3=A4=C3=B6=C3=BC=C3=9F) but n= ot with others (e.g =C5=BF=C3=B0=C4=91=C5=8B) and why does it happen when aset gets passed= a variable for the string but not when it gets passed the string itself? Steve Berman