emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Locale Dependent Downcasing in smtpmail]


From: Volkan YAZICI
Subject: Re: address@hidden: Locale Dependent Downcasing in smtpmail]
Date: Tue, 03 Apr 2007 02:20:48 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux)

Chong Yidong <address@hidden> writes:
> Kenichi Handa <address@hidden> writes:
>> 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.

Indeed, here's my reply to Kenichi Handa (in case it didn't reach to
you):

  Such a fix is quite unfeasible. What do you think to do for other
  problematic characters as well? Introduce a new if-else clause for
  every one?

  I am not faimilar with introducing a new macro policy of emacs team
  but it'd probably be useful (handy?) to have something similar to
  this macro:

  (with-locale-ctype 'ascii
   ;; Any call to DOWNCASE/UPCASE within this (dynamic?) scope will
   ;; use the case conversion table specified in the first argument
   ;; of the WITH-CASE-TABLE macro.
   ...)

> 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).

I really wonder if is there really no possible way to switch between
case conversion tables of different locales properly. At least, can't
we totally switch to ASCII locale temporarily?

> 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"?

Yes. But I can only answer for Turkish characters. Somebody needs to
look through whole locales. ;-) (BTW, did I mention that I suspect
similar cases in other places as well, like gnus?)


Regards.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]