From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: `write-region' writes different bytes than passed to it? Date: Sat, 22 Dec 2018 23:59:14 +0100 Message-ID: References: <83d0q8136v.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1545519471 8651 195.159.176.226 (22 Dec 2018 22:57:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Dec 2018 22:57:51 +0000 (UTC) Cc: help-gnu-emacs To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 22 23:57:47 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 1gaqDL-00028i-Ab for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Dec 2018 23:57:47 +0100 Original-Received: from localhost ([::1]:42062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaqFS-00061q-2K for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Dec 2018 17:59:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaqEx-00061f-4l for help-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:59:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaqEw-0002pN-G6 for help-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:59:27 -0500 Original-Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:35177) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gaqEw-0002ou-BY for help-gnu-emacs@gnu.org; Sat, 22 Dec 2018 17:59:26 -0500 Original-Received: by mail-ot1-x32c.google.com with SMTP id 81so8335653otj.2 for ; Sat, 22 Dec 2018 14:59:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dzh7w7PkwMu2aRNM6P9tvYMRuu3it73bdESZreLkE14=; b=qQx39aEVWEl92w+Bi0FnyD1c4DOpSPdliT/w8T0hp9iyEjybhMZbgvOnyCOyb3KsNS 893BV7nE8RY4tj+ulgOrhzBA8D1HrmB1Cwjt/+YbnqXdjJG2vZU8sXsZvkMnDie1hpVQ 8vj7x4NnvFgvTOW8yym41PF76JIgqRP08cnTrnNLtbOpv/jc/vuCAZZVqZicOoEvAMjS rZbwm3ZafzmztZx0eF9PJD8BKTqsDSI9wI3VI40Z9321Xmqon5d22fco3yLjQfvSTgsA 22cU3CblSXdEftzMVXfLYwh7IvnNKaBUiGvZl4AacrI7rBMbG3ooqE3xBac+9UadQTf0 9hJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Dzh7w7PkwMu2aRNM6P9tvYMRuu3it73bdESZreLkE14=; b=ibf0XAtxwQC24fwXssY4PZRoKkwV7jRft9gLH4eErO2kU2FmCR+7KPrqdlHjIM21cH /jlgoWJyaoLITPw0xv1GGM1XJlOCpws9k4bLor2mpzvq8PYlC4taEUwmzti1//upsMre kvWzX6zbI3rU8tY8inRnARDXQuMAkhVDue5104la9WzmdZyaVUHbg6GNKBa/5XToq6uP 7RRhhht5C2lRYzjrmGdYureG1k6UYZlst5VN173j3d5Od4kNzZ3mHek2av3a6CoQ0hLd uKkvkohW1zsnATzW9TgdwjrofDCCzvrxniOuixEeNDzxB7IHTIMpzuWRZ2jcC6qD45gX scaw== X-Gm-Message-State: AJcUukdn1sRSRKVskX86qjFAAKLtlsNV2QHjMCXT62/oHJLAvnJ05e0p q09y4xPvmRj398cJBWGi7e5S9+CuQgN/y83VkZe9xQ== X-Google-Smtp-Source: ALg8bN6kTsVXCKIotUikp4nmqhzKl486WupEsn4YQiQf9NtGLhvqB0bqYG/6zkgagjCam0dYeFYn2qQ1ZOSoD2nvqAo= X-Received: by 2002:a9d:2926:: with SMTP id d35mr5130619otb.355.1545519565693; Sat, 22 Dec 2018 14:59:25 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32c 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:119027 Archived-At: Am Di., 11. Dez. 2018 um 17:50 Uhr schrieb Stefan Monnier : > > > Yes, because "\xC1\xB2" just happens to be the internal multibyte > > representation of a raw-byte F2. Raw bytes are always converted to > > their single-byte values on output, regardless of the encoding you > > request. > > Maybe we shouldn't encode unibyte strings (under the assumption > that a unibyte string is already encoded: it's a sequence of bytes > rather than a sequence of chars). > That's what I'd expect (either this, or a signal).