🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #948

Re: Minor bug and patch for vm-url-decode-buffer [Repost]

#948
From: Kevin Rodgers
Date: Wed, 01 May 2002 18:13
43 lines
2910 bytes
Pete Forman wrote:
> vm-url-decode-buffer only recognizes upper case hex digits in escape
> codes following a "%".  RFCs 1738 and 2396 both allow upper and lower
> case.
> 
> Here is a patch that remedies the situation.  My VM is version 7.00.
> 
> *** vm-misc.el.orig     Sun Nov 18 20:36:09 2001
> --- vm-misc.el  Tue Feb  5 10:17:56 2002
> ***************
> *** 852,862 ****
>         (hex-digit-alist '((?0 .  0)  (?1 .  1)  (?2 .  2)  (?3 .  3)
>                            (?4 .  4)  (?5 .  5)  (?6 .  6)  (?7 .  7)
>                            (?8 .  8)  (?9 .  9)  (?A . 10)  (?B . 11)
> !                          (?C . 12)  (?D . 13)  (?E . 14)  (?F . 15)))
>         char)
>       (save-excursion
>         (goto-char (point-min))
> !       (while (re-search-forward "%[0-9A-F][0-9A-F]" nil t)
>         (insert-char (+ (* (cdr (assq (char-after (- (point) 2))
>                                       hex-digit-alist))
>                            16)
> --- 852,864 ----
>         (hex-digit-alist '((?0 .  0)  (?1 .  1)  (?2 .  2)  (?3 .  3)
>                            (?4 .  4)  (?5 .  5)  (?6 .  6)  (?7 .  7)
>                            (?8 .  8)  (?9 .  9)  (?A . 10)  (?B . 11)
> !                          (?C . 12)  (?D . 13)  (?E . 14)  (?F . 15)
> !                          (?a . 10)  (?b . 11)  (?c . 12)  (?d . 13)
> !                          (?e . 14)  (?f . 15)))
>         char)
>       (save-excursion
>         (goto-char (point-min))
> !       (while (re-search-forward "%[0-9A-Fa-f][0-9A-Fa-f]" nil t)
>         (insert-char (+ (* (cdr (assq (char-after (- (point) 2))
>                                       hex-digit-alist))
>                            16)

VM 7.02 added the lowercase characters to hex-digit-alist, but it didn't
add them to the regexp and it left case-fold-search explicitly bound to
nil.

-- 
Kevin Rodgers <kevinr@ihs.com>
Technical Details
Message-ID: <3CD03052.B5750260@ihs.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail
References: <de538c28.0202120104.1be8d094@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,8750cb7ec181fc1f
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 2002-05-01 11:13:36 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail
From: Kevin Rodgers <kevinr@ihs.com>
Newsgroups: gnu.emacs.vm.bug
Subject: Re: Minor bug and patch for vm-url-decode-buffer [Repost]
Date: Wed, 01 May 2002 12:13:38 -0600
Organization: Information Handling Services, Electronic Systems Development
Lines: 43
Message-ID: <3CD03052.B5750260@ihs.com>
References: <de538c28.0202120104.1be8d094@posting.google.com>
NNTP-Posting-Host: 170.207.51.80
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: fu-berlin.de 1020276813 13174356 170.207.51.80 (16 [82742])
X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.7 i86pc)
X-Accept-Language: en