(detect-mime-charset-region): Return `default-mime-charset-for-write'
if suitable mime-charset is not found.
It is used when MIME-charset is not specified.
It must be symbol.")
+(defvar default-mime-charset-for-write
+ default-mime-charset
+ "Default value of MIME-charset for encoding.
+It is used when suitable MIME-charset is not found.
+It must be symbol."
+ :group 'i18n
+ :type 'mime-charset)
+
(defun detect-mime-charset-region (start end)
"Return MIME charset for region between START and END."
- (charsets-to-mime-charset
- (cons lc-ascii (find-charset-region start end))))
+ (or (charsets-to-mime-charset
+ (cons lc-ascii (find-charset-region start end)))
+ default-mime-charset-for-write))
;;; @ end