[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Locale Dependent Downcasing in smtpmail]
From: |
Kenichi Handa |
Subject: |
Re: address@hidden: Locale Dependent Downcasing in smtpmail] |
Date: |
Mon, 02 Apr 2007 15:51:14 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.95 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Richard Stallman <address@hidden> writes:
> Would people please DTRT, then ack?
> ------- Start of forwarded message -------
> X-Spam-Status: No, score=2.8 required=5.0 tests=DNS_FROM_RFC_ABUSE,
> DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,SPF_PASS,UNPARSEABLE_RELAY
> autolearn=no version=3.1.0
> From: Volkan YAZICI <address@hidden>
> To: address@hidden
> Date: Wed, 28 Mar 2007 00:37:21 +0300
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Subject: Locale Dependent Downcasing in smtpmail
> Hi,
> smtpmail tries to downcase the strings using DOWNCASE function during
> the SMTP communication. But this leads to some problems in some
> locales. I spotted that problem when I tried to launch emacs with
> LC_CTYPE=tr_TR locale. In Turkish, downcased I is a dotless i.
> Therefore, while it tries to downcase some AUTH mechanisms (in
> smtpmail-via-smtp function), PLAIN and LOGIN turns into pla?n and
> log?n. And this causes (smtpmail-intersection smtpmail-auth-supported
> mechs) to return nil in smtpmail-try-auth-methods function.
Does the attached change fix the problem?
---
Kenichi Handa
address@hidden
*** smtpmail.el 10 Feb 2007 16:30:14 +0900 1.91
--- smtpmail.el 02 Apr 2007 15:49:05 +0900
***************
*** 691,697 ****
(>= (car response-code) 400))
(throw 'done nil)))
(dolist (line (cdr (cdr response-code)))
! (let ((name (mapcar (lambda (s) (intern (downcase s)))
(split-string (substring line 4) "[ ]"))))
(and (eq (length name) 1)
(setq name (car name)))
--- 691,704 ----
(>= (car response-code) 400))
(throw 'done nil)))
(dolist (line (cdr (cdr response-code)))
! (let ((name (mapcar (lambda (s)
! (setq s (downcase s))
! ;; If `I' is downcased to dotless-i,
! ;; convert it to `i'.
! (if (/= (downcase ?I) ?i)
! (subst-char-in-string
! (downcase ?I) ?i s t))
! (intern s))
(split-string (substring line 4) "[ ]"))))
(and (eq (length name) 1)
(setq name (car name)))