emacs-devel
[Top][All Lists]
Advanced

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

Re: Mysterious use of string-as-multibyte


From: handa
Subject: Re: Mysterious use of string-as-multibyte
Date: Mon, 15 Jan 2018 23:36:00 +0900

In article <address@hidden>, Stefan Monnier <address@hidden> writes:

> Do you remember why you added the call to string-as-multibyte in the
> patch below?
[...]
> -  (when smtpmail-code-conv-from
> -    (setq data (encode-coding-string data *internal* 
> smtpmail-code-conv-from)))
> +  (if (and (multibyte-string-p data)
> +           smtpmail-code-conv-from)
> +      (setq data (string-as-multibyte
> +                  (encode-coding-string data smtpmail-code-conv-from))))
        
>    (if smtpmail-debug-info
>        (insert data "\r\n"))

I don't remember, sorry.  By guessing from the code, that change is to
make DATA a multibyte string so that the encoding done by the following
process-send-string produces the correct byte sequence.  Perhaps, the
change was done before the introduction of string-to-multibyte which is
more suitable for that purpose.

---
K. Handa
address@hidden



reply via email to

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