From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Converting a string to valid XHTML id? Date: Thu, 2 Dec 2010 02:51:49 +0100 Message-ID: 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> <52305.130.55.118.19.1291252735.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291254744 30232 80.91.229.12 (2 Dec 2010 01:52:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Dec 2010 01:52:24 +0000 (UTC) Cc: rm@tuxteam.de, Ralf Mattes , emacs-devel@gnu.org To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 02 02:52:20 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 1PNyLL-0001ba-RL for ged-emacs-devel@m.gmane.org; Thu, 02 Dec 2010 02:52:20 +0100 Original-Received: from localhost ([127.0.0.1]:46176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNyLK-00008J-Gq for ged-emacs-devel@m.gmane.org; Wed, 01 Dec 2010 20:52:18 -0500 Original-Received: from [140.186.70.92] (port=45742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNyLE-0008UB-Lu for emacs-devel@gnu.org; Wed, 01 Dec 2010 20:52:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNyLD-0002I5-5x for emacs-devel@gnu.org; Wed, 01 Dec 2010 20:52:12 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:38233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNyLC-0002I1-U0 for emacs-devel@gnu.org; Wed, 01 Dec 2010 20:52:11 -0500 Original-Received: by wyj26 with SMTP id 26so271717wyj.0 for ; Wed, 01 Dec 2010 17:52:09 -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=JwfI7TOnRSD6xQQSHdVDU2SHUFD2kzw0BBXOuQXC3EA=; b=Uq4cxg64guFHzENzy7W7I2Kec4/3pm4s5qkzH4rclmZOD3lImlLVvc3fpI33MQIqDw FDcKVBTLfTANIONX6dFS1FaFyoFCNJMfYxtwWqrMtDhyj8d4mRmU960dgefCXs7ofiOa zTb19KVyXPonnN1hfEhInsbai8G005RRwJRWg= 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=twFVPbS606Vk2sxK/MytdwI8sLKEfuJMS8Cj2/dpweH24pnfCytPV8wtfLbwYThGqV Ro2zllALRqHIzfF/bUh990lZVxJmHGD6vT0XaFdVMWkIf12rjlVqLMC2E2lvHLq3mYW4 2cailfRrZt4UFik/Rz1RilsmUBPLsD0ehdGBQ= Original-Received: by 10.216.140.37 with SMTP id d37mr2840215wej.31.1291254729893; Wed, 01 Dec 2010 17:52:09 -0800 (PST) Original-Received: by 10.216.44.204 with HTTP; Wed, 1 Dec 2010 17:51:49 -0800 (PST) In-Reply-To: <52305.130.55.118.19.1291252735.squirrel@webmail.lanl.gov> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:133294 Archived-At: On Thu, Dec 2, 2010 at 2:18 AM, Davis Herring wrote: >> 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? =C2=A0W= hat I > wrote does that, by making the string longer when it contains characters > that can't be used directly. =C2=A0It'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. =C2=A0(In > particular, it must be that |A|^n<=3D|B|^(n+e) for any such injective > coding.) =C2=A0Like base64 or uuencode or quoted-printable. Yes, but I can't see that you cover the case that the id converted id is already used. Or do you do that?