From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Converting a string to valid XHTML id? Date: Wed, 1 Dec 2010 17:18:55 -0800 (PST) Message-ID: <52305.130.55.118.19.1291252735.squirrel@webmail.lanl.gov> References: <40291.130.55.118.19.1291217640.squirrel@webmail.lanl.gov> <20101201155858.GB12842@seid-online.de> <54241.130.55.118.19.1291242750.squirrel@webmail.lanl.gov> <40669.130.55.118.19.1291245408.squirrel@webmail.lanl.gov> <45992.130.55.118.19.1291248744.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1291252754 23552 80.91.229.12 (2 Dec 2010 01:19:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Dec 2010 01:19:14 +0000 (UTC) Cc: rm@tuxteam.de, Ralf Mattes , emacs-devel@gnu.org To: "Lennart Borgman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 02 02:19:09 2010 Return-path: Envelope-to: ged-emacs-devel@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 1PNxpE-0006oX-6y for ged-emacs-devel@m.gmane.org; Thu, 02 Dec 2010 02:19:08 +0100 Original-Received: from localhost ([127.0.0.1]:50239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNxpD-0004bC-JW for ged-emacs-devel@m.gmane.org; Wed, 01 Dec 2010 20:19:07 -0500 Original-Received: from [140.186.70.92] (port=49167 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNxp6-0004ZX-52 for emacs-devel@gnu.org; Wed, 01 Dec 2010 20:19:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNxp5-00041e-4N for emacs-devel@gnu.org; Wed, 01 Dec 2010 20:18:59 -0500 Original-Received: from proofpoint1.lanl.gov ([204.121.3.25]:39706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNxp4-00041U-QM for emacs-devel@gnu.org; Wed, 01 Dec 2010 20:18:59 -0500 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint1 (8.14.3/8.14.3) with ESMTP id oB21ItW5013337; Wed, 1 Dec 2010 18:18:55 -0700 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 8452A1512E8; Wed, 1 Dec 2010 18:18:55 -0700 (MST) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 7025E151063; Wed, 1 Dec 2010 18:18:55 -0700 (MST) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id 6E6731CA827B; Wed, 1 Dec 2010 18:18:55 -0700 (MST) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 1 Dec 2010 17:18:55 -0800 (PST) In-Reply-To: User-Agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2010-12-01_12:2010-12-02, 2010-12-01, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133293 Archived-At: > I don't understand how your version is supposed to work. How can it be > unique if it does not keep track of if the id is already used? (Or did > you say that this case is not covered?) The requirement is that unique inputs map to unique outputs, yes? What I wrote does that, by making the string longer when it contains characters that can't be used directly. It's a standard thing: map the strings in A^n onto B^(n+e), where B is a smaller alphabet than A and e is the extra length required because each letter conveys less information. (In particular, it must be that |A|^n<=|B|^(n+e) for any such injective coding.) Like base64 or uuencode or quoted-printable. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.