From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: florian Newsgroups: gmane.emacs.help Subject: Is X'ABCD' notation of general interest? (was: Converting strings of hexadecimal numbers to the respective bytes) Date: Thu, 9 Apr 2009 03:05:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <45202d31-fd33-4b35-9bb7-fe4af6eb4012@c9g2000yqm.googlegroups.com> References: <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: quoted-printable X-Trace: ger.gmane.org 1239273660 3839 80.91.229.12 (9 Apr 2009 10:41:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2009 10:41:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 09 12:42:19 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 1Lrrhx-00075h-Np for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Apr 2009 12:42:10 +0200 Original-Received: from localhost ([127.0.0.1]:35974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrrgZ-0001RS-Cx for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Apr 2009 06:40:43 -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: 24 Original-NNTP-Posting-Host: 88.78.18.252 Original-X-Trace: posting.google.com 1239271503 29086 127.0.0.1 (9 Apr 2009 10:05:03 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 9 Apr 2009 10:05:03 +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:168323 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:63604 Archived-At: Juanma, > =A0 (string-to-number string &optional base) many thanks. I swear I did RTFM, or rather rummage it, but I obviously missed that important bit. Your hint was just what I lacked, and I used it to program two small functions for converting strings in X'ABCD' notation into their binary form and vice versa, along with two functions to do the same with file contents (i.e. file contents to X'ABCD' and vice versa). The X'ABCD' notation represents arbitrary bytes as their two-digit hexadecimal representation, which produces strings that have double the size and can be passed over the command line (SQLite uses this). Does anybody think that functions to handle that (I have round-trip tested them) would be of general interest, so that posting them on gnu.emacs.sources would make sense? (Just don't want to clutter public space needlessly.) Many thanks again, and best regards, Florian