From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [yazicivo@ttnet.net.tr: Locale Dependent Downcasing in smtpmail] Date: Tue, 03 Apr 2007 10:24:31 +0900 Message-ID: References: <87ejn2jsnu.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1175563492 30172 80.91.229.12 (3 Apr 2007 01:24:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2007 01:24:52 +0000 (UTC) Cc: yazicivo@ttnet.net.tr, rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 03 03:24:50 2007 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.50) id 1HYXlO-0000ho-BH for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2007 03:24:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYXoT-0006Tr-Ob for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2007 21:27:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYXoQ-0006Tm-Lh for emacs-devel@gnu.org; Mon, 02 Apr 2007 21:27:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYXoN-0006Ta-29 for emacs-devel@gnu.org; Mon, 02 Apr 2007 21:27:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYXoM-0006TX-TT for emacs-devel@gnu.org; Mon, 02 Apr 2007 21:27:50 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HYXlF-0001tx-Jl; Mon, 02 Apr 2007 21:24:38 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id l331OXh8028030; Tue, 3 Apr 2007 10:24:33 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id l331OXJ5012246; Tue, 3 Apr 2007 10:24:33 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id l331OVgP018973; Tue, 3 Apr 2007 10:24:31 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.63) (envelope-from ) id 1HYXl9-0005mv-Mj; Tue, 03 Apr 2007 10:24:31 +0900 In-reply-to: <87ejn2jsnu.fsf@stupidchicken.com> (message from Chong Yidong on Mon, 02 Apr 2007 18:52:21 -0400) 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) X-detected-kernel: Solaris 8 (1) 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:68959 Archived-At: In article <87ejn2jsnu.fsf@stupidchicken.com>, Chong Yidong writes: > Kenichi Handa writes: >>> smtpmail tries to downcase the strings using DOWNCASE function >>> during the SMTP communication. 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. > > > > Does the attached change fix the problem? > > > > ! (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)) > I wonder if there's a better way to do this. Maybe we can define an > ascii case table that doesn't get overwritten by the locale; then code > like the above can bind to this case table temporarily (or we can > define a downcase-ascii function that does such a thing). > But maybe, for Emacs 22, the above hack is all we need. Is it true > that in practice, all we have to worry about is "i"? In practice I think only dotless-i is the problematic character. But, I don't know what is the right thing for the code around there for non-ascii characters. For instance, dotted-I (U+0130) is downcased to `i'. Is it ok? --- Kenichi Handa handa@m17n.org