From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: How switch from escaped octal character code to escaped HEX? Date: Mon, 3 Jan 2011 11:13:48 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294049701 23696 80.91.229.12 (3 Jan 2011 10:15:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 10:15:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 03 11:14:57 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZhRJ-0002UU-9K for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 11:14:57 +0100 Original-Received: from localhost ([127.0.0.1]:58454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZhRI-0007tv-M7 for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 05:14:56 -0500 Original-Received: from [140.186.70.92] (port=48925 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZhQi-0007tg-6P for help-gnu-emacs@gnu.org; Mon, 03 Jan 2011 05:14:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZhQh-0008RS-27 for help-gnu-emacs@gnu.org; Mon, 03 Jan 2011 05:14:20 -0500 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:37043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZhQg-0008RN-VQ for help-gnu-emacs@gnu.org; Mon, 03 Jan 2011 05:14:19 -0500 Original-Received: by iwn40 with SMTP id 40so14873084iwn.0 for ; Mon, 03 Jan 2011 02:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=3iqWg7bzGTREU9s0MuhJSktMNuurtujjJYiBT9HZafI=; b=IvG60YVStxFJpWk09Mh0Kir+A/xD7kBTti6BJsHDHStzbeRbL7FYv+46qtBrSuM0jd 5c4ihXqQe2hvdJQFUO8z7HHfSkvF1p7JqJGJTmtsxhZa3oxdI2Af8SPKR06RjYAVlASp 0UHNAuJXtcCav02tQRlM6kZrODfakcnpjgyfM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ZRsgc/CI0k7uiNONZwNm3nv23U2dZkvZLIlyNM4kdA9wdSRZwMwPoXKiq/3MGI6upO Mcn46y9bfg+XQJeIyfI4FE7xKKLb/7iKMVNNgGyUjoyNm49zbG6awxMUIWvoTNFb1Yuj NHiASgPOHjbpG80Id7xuNR5JjD2fGZCkyUzSw= Original-Received: by 10.231.16.75 with SMTP id n11mr4168497iba.106.1294049658542; Mon, 03 Jan 2011 02:14:18 -0800 (PST) Original-Received: by 10.231.39.132 with HTTP; Mon, 3 Jan 2011 02:13:48 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78101 Archived-At: 2011/1/3 Deniz Dogan : > 2011/1/3 Stefan Monnier : >>>> When Emacs find that byte that does >>>> not correspond to any specific displayable character it display >>>> octal codes instead, like: \276 (and with different color). >>>> >>>> This is useful, but I prefer HEX base instead octal. >> >> There is no direct/easy way to do it. >> But you can do it by adding the corresponding 128 entries to the >> standard-display-table. >> >> E.g. >> >> =A0 (setq standard-display-table (make-display-table)) >> =A0 (aset standard-display-table (unibyte-char-to-multibyte 131) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[?\\ ?x ?= 8 ?3]) >> =A0 (aset standard-display-table (unibyte-char-to-multibyte 132) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[?\\ ?x ?= 8 ?4]) >> >> Should make the bytes 131 and 132 be displayed as \x83 and \x84 rather >> than \203 and \204. >> >> > > What is the reasoning behind displaying it in octal rather than > decimal or hexadecimal in the first place? I didn't know people cared > about octals anymore. > I read on Wikipedia: "Octal representation of non-ASCII bytes may be particularly handy with UTF-8, where any start byte has octal value \3nn and any continuation byte has octal value \2nn." Is this the reason perhaps? --=20 Deniz Dogan