From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: yet more term.el fixes #2 Date: Wed, 22 Sep 2004 10:43:25 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200409221743.i8MHhSGK020804@scanner2.ics.uci.edu> References: <200409220317.i8M3HEGK002410@scanner2.ics.uci.edu> <200409220418.i8M4IJGK005554@scanner2.ics.uci.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095875142 29779 80.91.229.6 (22 Sep 2004 17:45:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2004 17:45:42 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 19:45:23 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CABBC-0003GC-00 for ; Wed, 22 Sep 2004 19:45:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CABHB-0001f6-Lk for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2004 13:51:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CABH4-0001dm-3x for emacs-devel@gnu.org; Wed, 22 Sep 2004 13:51:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CABH3-0001dS-Fu for emacs-devel@gnu.org; Wed, 22 Sep 2004 13:51:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CABH3-0001dI-8n for emacs-devel@gnu.org; Wed, 22 Sep 2004 13:51:25 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CABB0-0006rm-9a; Wed, 22 Sep 2004 13:45:10 -0400 Original-Received: from vino.ics.uci.edu (dann@vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.12.10/8.12.10) with ESMTP id i8MHhSGK020804; Wed, 22 Sep 2004 10:43:28 -0700 (PDT) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Wed, 22 Sep 2004 09:16:46 -0400") Original-Lines: 34 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-99.4, required 5, J_CHICKENPOX_42, USER_IN_WHITELIST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27450 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27450 Stefan Monnier writes: > > When simply inserting raw character values in to the buffer, it seems > > that some sort of default decoding takes place at insert/display time, > > Yes, `insert' says it uses string-make-multibyte which itself uses > unibyte-char-to-multibyte. > > By the way, `insert' also says "if you want to preserve binary data as > binary, use string-as-multibyte", shouldn't that be "string-TO-multibyte"? Well, I managed to make it work, I needed to add: (set-buffer-multibyte t) to `term-mode' and change the (insert (substring str i funny)) call in `term-emulate-terminal' to: (insert (string-as-unibyte (substring str i funny))) This works with both: EMACS_UNIBYTE=1 emacs EMACS_UNIBYTE=0 emacs One way to test it is to run lynx www.emacswiki.org in the term.el terminal and check that the language names are printed correctly. I don't know if the above changes are strictly correct, so I'd appreciate is somebody could confirm it. Thanks. --dan