🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: search for vm-mime-encode-headers-words-regexp should not fold case

#445
From: Ulrich Mueller
Date: Thu, 19 Jul 2007 17:25
40 lines
2692 bytes
>> The search for vm-mime-encode-headers-words-regexp in
>> vm-mime-encode-headers may fail, depending on the user's case-table.
>> Setting case-fold-search to nil will prevent this.

> How could it fail if both lower and upper case are within the
> character searched class? 

It can fail since equivalence for search is controlled by the
CANONICALIZE and EQUIVALENCES slots of the case table, and there is
more to it than upper and lower case (see section "4.9 The Case Table"
in the Elisp reference manual).

To reproduce the problem, evalute the following lisp expression and
then send an e-mail with a subject containing Umlaut characters, e. g.
"Subject: ���". No MIME encoding of the subject will take place.

   ;; Ignore accent and umlaut marks when searching.
   (let ((eqv-list '("aA������������"
                     "cC��"
                     "eE��������"
                     "iI��������"
                     "nN��"
                     "oO������������"
                     "uU��������"
                     "yY���"))
         (table (standard-case-table))
         canon)
     (setq canon (copy-sequence table))
     (mapc (lambda (s)
             (mapc (lambda (c) (aset canon c (aref s 0))) s))
           eqv-list)
     (set-char-table-extra-slot table 1 canon)
     (set-char-table-extra-slot table 2 nil)
     (set-standard-case-table table))

> Anyway, it should not harm to set case-fold-search to nil ;-)

Exactly. ;-)

Ulrich
Technical Details
Message-ID: <u1wf4joew@a1i15.kph.uni-mainz.de>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.Uni-Mainz.DE!not-for-mail
References: <ulkddv4bp@a1i15.kph.uni-mainz.de> <85abttqvv5.fsf@robf.de>

Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,147030f772289cf7
X-Google-Attributes: gidf6829,public,usenet
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.Uni-Mainz.DE!not-for-mail
From: Ulrich Mueller <ulm@gentoo.org>
Newsgroups: gnu.emacs.vm.bug
Subject: Re: search for vm-mime-encode-headers-words-regexp should not fold case
Date: Thu, 19 Jul 2007 19:25:59 +0200
Organization: Institut fuer Kernphysik, Universitaet Mainz
Lines: 40
Message-ID: <u1wf4joew@a1i15.kph.uni-mainz.de>
References: <ulkddv4bp@a1i15.kph.uni-mainz.de> <85abttqvv5.fsf@robf.de>
NNTP-Posting-Host: host2092.kph.uni-mainz.de
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news1.zdv.uni-mainz.de 1184865960 5852 134.93.134.92 (19 Jul 2007 17:26:00 GMT)
X-Complaints-To: news@uni-mainz.de
NNTP-Posting-Date: Thu, 19 Jul 2007 17:26:00 +0000 (UTC)
Cancel-Lock: sha1:FyPZHaP39hZAsnEqeBj1JUnvlqQ=