From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [yazicivo@ttnet.net.tr: Locale Dependent Downcasing in smtpmail] Date: Mon, 02 Apr 2007 18:52:21 -0400 Message-ID: <87ejn2jsnu.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175554481 7650 80.91.229.12 (2 Apr 2007 22:54:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2007 22:54:41 +0000 (UTC) Cc: yazicivo@ttnet.net.tr, rms@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 03 00:54:40 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 1HYVQ6-00013K-Km for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2007 00:54:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYVTB-0005BQ-8y for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2007 18:57:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYVT7-00057F-9l for emacs-devel@gnu.org; Mon, 02 Apr 2007 18:57:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYVT6-00054s-Ht for emacs-devel@gnu.org; Mon, 02 Apr 2007 18:57:44 -0400 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HYVQ1-0003kg-0s; Mon, 02 Apr 2007 18:54:33 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l32MsUqY010907; Mon, 2 Apr 2007 18:54:30 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l32MqMOl022611; Mon, 2 Apr 2007 18:52:22 -0400 (EDT) Original-Received: from localhost (MAIN-TWELVE-TWO-FIFTY-SIX.MIT.EDU [18.19.6.1]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l32MqLKx024094; Mon, 2 Apr 2007 18:52:21 -0400 (EDT) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HYVNt-0001KN-00; Mon, 02 Apr 2007 18:52:21 -0400 In-Reply-To: (Kenichi Handa's message of "Mon\, 02 Apr 2007 15\:51\:14 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.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:68948 Archived-At: 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"? (I tried changing this another way, but that turned out to be bogus, so I reverted my patch. Sorry for the noise.)