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: Re: Why does using aset sometimes output raw bytes? Date: Sun, 09 Dec 2018 16:46:01 +0100 Message-ID: <87d0qaog92.fsf@gmx.net> References: <87h8fmohmo.fsf@gmx.net> <83y38y3exe.fsf@gnu.org> 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 1544370278 21331 195.159.176.226 (9 Dec 2018 15:44:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2018 15:44:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 16:44:34 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 1gW1Fx-0005Qi-HN for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 16:44:33 +0100 Original-Received: from localhost ([::1]:55794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW1I4-0005MP-A9 for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 10:46:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW1HV-0005LN-DO for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 10:46:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW1HS-0004ol-7b for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 10:46:09 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:55635) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gW1HQ-0004nS-Eg; Sun, 09 Dec 2018 10:46:06 -0500 Original-Received: from rosalinde ([88.74.23.82]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mb31L-1gll0j1ZW7-00KgIf; Sun, 09 Dec 2018 16:46:02 +0100 In-Reply-To: <83y38y3exe.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 09 Dec 2018 17:20:13 +0200") X-Provags-ID: V03:K1:8hjLJL+3/5sy14CTB44tTiLFISUdswsyYbwatGhRFtTWNYNQryV 01JR/JZ8y/g/4j5nlomlVcgNTi/Q+vYnLPfjnV2JgAfDmHnX2p47kGXWsJe7A5VBQPb/MBt PAlHI/pBx84wL5crrKTWfkIxj5XJYq4YzLCTi1dsvxecgrW1aIRVLAzVhRodatDSR3NDzZU GoI2BxXmRQb1Rh9Yx7wYw== X-UI-Out-Filterresults: notjunk:1;V03:K0:0B0/ZR7kPwk=:LpPPp8G6Ee4a8pZSRQ/68c KH1QkIAedk+qEWOu+Hhp4R97GV5i7nZ1gTCQlve5cXSsGjLXsrRclTs5ITVNNpNrOn0UhrKf7 uaaWk/l8MIzzuifTEvS7JB6AL9zo9ZqCzRNTzNeyTap5i+H1XysN+v0BebH14RKxF+wOtJydr 8ldI0ZcDW5XWI3zCMTXg4/++5KmzwyzmfGmIU7FQRIYNm6VQC89zqFHr81+nah7d2Nb2z8gMa OQPbjfvLPbaKobbEtvU2CPgsSwrr6yYUxHbos77aO1Y8IBkIEov8gvcXw/8/2x/TcDCd9tvMA re8QdP3jeqKXwSqZQ9yK1iMtJ74AQ/Ys/jrkSqgEbygA4AtBxeBNJImmshmtK67z73viYENk/ OLoeztZyTdrzuPMUJDTnMBAZL5Fo2tYPJlk8MblabEGt88k0BUMUqLrBFJdEfNaLFfvR/pdBs vmq5VNm9DPdoT8AGFeTxzjWvzMBQHveIVnACFQouNOJhmBxrfa9EfCKz67I7jt/xedzh+nIXS b/DVAsqc7I08uLIyPAJlziwMe4wnMeDffQBopLsBgxJvHmJiSZLIfWW62taA9AJN2eI48UXu0 wr51yBJiGcOic5PIde4Hn/QA8tR2SJ79cmFCIXxlssqLvF+eNHJNb7fVBE9GUJRqNjZ5NuYcA Ln+aN8H56Rlw1/sigNgaEUGSk0RI18+fORkNkhXce9uwigrM3fhUcjedO2x27ZczjNgLQv3wN SopMr9DgwQIFPWC4MaidFzs8H6dELhP82FW/S9QZMQAwXwlcfGCD/aF4pglDoRtmFP4HwxSD X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.22 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:118940 Archived-At: On Sun, 09 Dec 2018 17:20:13 +0200 Eli Zaretskii wrote: >> Here's what gets inserted into the buffer (I've represented the raw >> bytes by ascii strings to make sure they're readable here): >>=20 >> \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 >>=20 >> 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) bu= t not with others >> (e.g =C5=BF=C3=B0=C4=91=C5=8B) and why does it happen when aset gets pas= sed a variable >> for the string but not when it gets passed the string itself? > > s0 and s2 originally include only pure ASCII characters, so they are > unibyte strings. Try making them multibyte before using aset. Thanks, that works. But why are raw bytes inserted only with some multibyte strings (e.g. with "=C3=A4=C3=B6=C3=BC=C3=9F" but not with "=C5= =BF=C3=B0=C4=91=C5=8B")? Also, is there some way to ensure a string is handled as multibyte if it's not known what characters it contains? E.g., s0 in my example sexp could be bound to some string by a function call and before applying the function it is not known if the string is multibyte; is there some way in Lisp to say "treat the value of s0 as multibyte (regardless of what characters it contains)"? Steve Berman