From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: florian Newsgroups: gmane.emacs.help Subject: Converting strings of hexadecimal numbers to the respective bytes Date: Mon, 6 Apr 2009 15:22:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4e8b531d-ecc7-4b71-ac69-faa82eccd4ae@c9g2000yqm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1239057655 8537 80.91.229.12 (6 Apr 2009 22:40:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Apr 2009 22:40:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 07 00:42:14 2009 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.50) id 1LqxW7-0001uu-Sm for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Apr 2009 00:42:12 +0200 Original-Received: from localhost ([127.0.0.1]:56616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqxUj-0003o0-Jk for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Apr 2009 18:40:45 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!c9g2000yqm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: 88.78.18.252 Original-X-Trace: posting.google.com 1239056522 30906 127.0.0.1 (6 Apr 2009 22:22:02 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 6 Apr 2009 22:22:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c9g2000yqm.googlegroups.com; posting-host=88.78.18.252; posting-account=D6LMWQoAAAA9mPFBi-XXlCxVbyI2qOo- User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.61 (X11; Linux i686; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:168244 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:63524 Archived-At: I was wondering if it is possible to convert a string, say '0a', which represents a two-digit hexadecimal number, to the corresponding byte. The solution does not seem far away (something like char-to-string), but surprisingly, Elisp does not seem to deal much with hexadecimal numbers. What I mean is: if it were a three-digit decimal representation, you could say (char-to-string (string-to-number "010")) instead, but I don't seem to see such a possibility for a hexadecimal number. The question may be very dumb, but could Elisp do such a thing at all? Thanks for any enlightenment ... Florian