I finally tracked down something that has been bugging me for years
now.

When I get mail From: non-ASCII names, whenever the inbox is
auto-saved, I get errors about invalid encodings; and when I save and
re-visit the folder, the non-ASCII has been replaced by ~ .

This is because when the folder is saved, the cached message data is
written out to the X-vm-v5-data header, with non-ASCII data being
mime-encoded. However, vm-mime-encode-words relies on 

(defcustom vm-mime-encode-headers-words-regexp
  (let ((8bit-word "\\([^ ,\t\n\r]*[^\x0-\x7f]+[^ ,\t\n\r]*\\)+"))
    (concat "[ ,\t\n\r]\\(" 8bit-word "\\(\\s-+" 8bit-word "\\)*\\)"))
  "*A regexp matching a set of consecutive words which must be encoded."
  :group 'vm-mime
  :type '(regexp))

which, as its name suggests, is written for use in headers, where the
content will always start with white space. By changing this to

(defcustom vm-mime-encode-headers-words-regexp
  (let ((8bit-word "\\([^ ,\t\n\r]*[^\x0-\x7f]+[^ ,\t\n\r]*\\)+"))
    (concat "\\(^\\|[ ,\t\n\r]\\)\\(" 8bit-word "\\(\\s-+" 8bit-word "\\)*\\)"))
  "*A regexp matching a set of consecutive words which must be encoded."
  :group 'vm-mime
  :type '(regexp))

so that start of buffer is a legitimate word start, my problem was
solved.

But am I really the only person who has this problem?

Reply via email to