Re: Can't send messages containing hankaku chars

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.mail.emacs.mime.japanese
Organization Emacsen advocacy group
Message-ID <[email protected]>
semi-1_14  emiko-1_14  SEMI 

>>>>> In [emacs-mime-ja : No.01589]  wrote:

> 
>  Emacs 21.3.50 21.3 
> SEMI  FLIM 

> Debugger entered--Lisp error: (error "Multibyte character in data for base64 encoding")
>   base64(125 131)
>   mime-encode-region(125 131 "base64")
>   mime-edit-normalize-body()
>   mime-edit-translate-region(89 94 "Multipart_Tue_Dec_16_21:42:34_2003-1")
>   mime-edit-translate-body()
>   run-hooks(mime-edit-translate-buffer-hook)
>   byte-code("..." [run-hooks mime-edit-translate-buffer-hook] 2)
>   mime-edit-translate-buffer()
>   mime-edit-preview-message()
>   call-interactively(mime-edit-preview-message)

Multibyte  unibyte  (replace-match "\\N")
 Emacs  multibyte 
(Emacs  CVS 
 1:-)

 multibyte 
\N 



(let* ((default-enable-multibyte-characters t)
       (string (encode-coding-string "" 'shift_jis)))
  (string-match "\\(.+\\)" string)
  (append (replace-match "\\1" nil nil string) nil))
 => (151 121)

(let* ((default-enable-multibyte-characters t)
       (string (encode-coding-string "" 'shift_jis)))
  (with-temp-buffer
    (insert string)
    (goto-char (point-min))
    (looking-at "\\(.+\\)")
    (replace-match "\\1")
    (append (buffer-string) nil)))
 => (158 2231 121)
-- 
Katsumi Yamaoka <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.