unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: downcase'ing wrt locale in smtpmail.el
       [not found] <87ps6t71t9.fsf@ttnet.net.tr>
@ 2008-01-12 10:39 ` Simon Josefsson
  2008-01-12 12:48   ` Reiner Steib
  2008-01-13  8:34   ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Josefsson @ 2008-01-12 10:39 UTC (permalink / raw)
  To: yazicivo; +Cc: emacs-pretest-bug, emacs-snapshot

yazicivo@ttnet.net.tr writes:

> Hi,
>
> In smtpmail.el, protocol messages are getting downcased with respect
> to current locale. For instance, it downcases AUTH methods (LOGIN,
> PLAIN, etc.) and then compares them with the related downcased symbols
> '(login plain ...). And in Turkish, a downcased I is ı (dotless i),
> not i. Therefore, comparison fails because of logın != login or plaın
> != plain. IMHO, downcased must be applied using en_US locale.
>
> To reproduce the problem, start emacs with LC_CTYPE=tr_TR prefix and
> try to send a mail via smtpmail package.

I just noticed this report.  Is there a function in elisp that does
downcase in the C locale?  For this use, we only care about ASCII, so a
'tr A-Z a-z' would work.  Do smtpmail.el have to implement a
'downcase-ascii' function itself?

/Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: downcase'ing wrt locale in smtpmail.el
  2008-01-12 10:39 ` downcase'ing wrt locale in smtpmail.el Simon Josefsson
@ 2008-01-12 12:48   ` Reiner Steib
  2008-01-14 14:02     ` Simon Josefsson
  2008-01-13  8:34   ` Richard Stallman
  1 sibling, 1 reply; 4+ messages in thread
From: Reiner Steib @ 2008-01-12 12:48 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: emacs-pretest-bug, yazicivo, emacs-snapshot

On Sat, Jan 12 2008, Simon Josefsson wrote:

> yazicivo@ttnet.net.tr writes:
[...]
>> In smtpmail.el, protocol messages are getting downcased with respect
>> to current locale. For instance, it downcases AUTH methods (LOGIN,
>> PLAIN, etc.) and then compares them with the related downcased symbols
>> '(login plain ...). And in Turkish, a downcased I is ı (dotless i),
>> not i. Therefore, comparison fails because of logın != login or plaın
>> != plain. IMHO, downcased must be applied using en_US locale.
[...]
> I just noticed this report.  Is there a function in elisp that does
> downcase in the C locale?  For this use, we only care about ASCII, so a
> 'tr A-Z a-z' would work.  Do smtpmail.el have to implement a
> 'downcase-ascii' function itself?

Chong Yidong has fixed some similar issues in smtpmail.el using
with-case-table / ascii-case-table, see
http://thread.gmane.org/gmane.emacs.gnus.general/64489/focus=64496

See <http://thread.gmane.org/gmane.emacs.devel/68859> for the quite
long discussion about this problem (Subject: ... Locale Dependent
Downcasing in smtpmail).  Oh, know I notice that
<yazicivo@ttnet.net.tr> reported this problem, so I'd guess it has
been fixed by Chong Yidong's change.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: downcase'ing wrt locale in smtpmail.el
  2008-01-12 10:39 ` downcase'ing wrt locale in smtpmail.el Simon Josefsson
  2008-01-12 12:48   ` Reiner Steib
@ 2008-01-13  8:34   ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2008-01-13  8:34 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: emacs-pretest-bug, yazicivo, emacs-snapshot

    I just noticed this report.  Is there a function in elisp that does
    downcase in the C locale?  For this use, we only care about ASCII, so a
    'tr A-Z a-z' would work.  Do smtpmail.el have to implement a
    'downcase-ascii' function itself?

You can switch to the standard case table for this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: downcase'ing wrt locale in smtpmail.el
  2008-01-12 12:48   ` Reiner Steib
@ 2008-01-14 14:02     ` Simon Josefsson
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Josefsson @ 2008-01-14 14:02 UTC (permalink / raw)
  To: yazicivo; +Cc: emacs-pretest-bug, emacs-snapshot

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> On Sat, Jan 12 2008, Simon Josefsson wrote:
>
>> yazicivo@ttnet.net.tr writes:
> [...]
>>> In smtpmail.el, protocol messages are getting downcased with respect
>>> to current locale. For instance, it downcases AUTH methods (LOGIN,
>>> PLAIN, etc.) and then compares them with the related downcased symbols
>>> '(login plain ...). And in Turkish, a downcased I is ı (dotless i),
>>> not i. Therefore, comparison fails because of logın != login or plaın
>>> != plain. IMHO, downcased must be applied using en_US locale.
> [...]
>> I just noticed this report.  Is there a function in elisp that does
>> downcase in the C locale?  For this use, we only care about ASCII, so a
>> 'tr A-Z a-z' would work.  Do smtpmail.el have to implement a
>> 'downcase-ascii' function itself?
>
> Chong Yidong has fixed some similar issues in smtpmail.el using
> with-case-table / ascii-case-table, see
> http://thread.gmane.org/gmane.emacs.gnus.general/64489/focus=64496
>
> See <http://thread.gmane.org/gmane.emacs.devel/68859> for the quite
> long discussion about this problem (Subject: ... Locale Dependent
> Downcasing in smtpmail).  Oh, know I notice that
> <yazicivo@ttnet.net.tr> reported this problem, so I'd guess it has
> been fixed by Chong Yidong's change.

I'm happy to hear that it has already been fixed.  I didn't notice any
follow-ups on the post to emacs-pretest, that's why I asked again.

Thanks,
/Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-14 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87ps6t71t9.fsf@ttnet.net.tr>
2008-01-12 10:39 ` downcase'ing wrt locale in smtpmail.el Simon Josefsson
2008-01-12 12:48   ` Reiner Steib
2008-01-14 14:02     ` Simon Josefsson
2008-01-13  8:34   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).