From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] web: uri-encode hexadecimal percent-encoding is now uppercase Date: Thu, 02 May 2013 14:53:29 -0400 Message-ID: <8761z1gqmu.fsf@tines.lan> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367520841 14888 80.91.229.3 (2 May 2013 18:54:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 May 2013 18:54:01 +0000 (UTC) Cc: guile-devel To: Aleix Conchillo =?utf-8?Q?Flaqu=C3=A9?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu May 02 20:54:00 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UXydi-0004wN-P0 for guile-devel@m.gmane.org; Thu, 02 May 2013 20:53:58 +0200 Original-Received: from localhost ([::1]:53222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXydi-000067-Fw for guile-devel@m.gmane.org; Thu, 02 May 2013 14:53:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXydf-00005V-EW for guile-devel@gnu.org; Thu, 02 May 2013 14:53:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXyde-0003DI-9O for guile-devel@gnu.org; Thu, 02 May 2013 14:53:55 -0400 Original-Received: from world.peace.net ([96.39.62.75]:48578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXyde-0003B2-4k for guile-devel@gnu.org; Thu, 02 May 2013 14:53:54 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UXydN-0003Bn-8c; Thu, 02 May 2013 14:53:37 -0400 In-Reply-To: ("Aleix Conchillo \=\?utf-8\?Q\?Flaqu\=C3\=A9\=22's\?\= message of "Thu, 2 May 2013 10:44:20 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16340 Archived-At: Hi Aleix, This patch looks good to me, except that I don't like the variable name 'num' for a string. Actually, I'm not sure we need to bind that to a variable at all. How about just wrapping 'string-upcase' around the call to 'number->string'? Thanks, Mark > @@ -396,11 +396,12 @@ hexadecimal representation of the byte." > (len (bytevector-length bv))) > (let lp ((i 0)) > (if (< i len) > - (let ((byte (bytevector-u8-ref bv i))) > + (let* ((byte (bytevector-u8-ref bv i)) > + (num (number->string byte 16))) > (display #\% port) > (when (< byte 16) > (display #\0 port)) > - (display (number->string byte 16) port) > + (display (string-upcase num) port) > (lp (1+ i)))))))) > str))) > str))