(message-idna-to-ascii-rhs): Use it.
gnus-art.el (gnus-use-idna): Disable if UTF-8 unavailable.
+2003-03-20 Simon Josefsson <jas@extundo.com>
+
+ * message.el (message-use-idna): Disable if UTF-8 unavailable.
+ (message-idna-to-ascii-rhs): Use it.
+
+ * gnus-art.el (gnus-use-idna): Disable if UTF-8 unavailable.
+
2003-03-19 Teodor Zlatanov <tzz@lifelogs.com>
* spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p)
(defvar gnus-article-wash-function nil
"Function used for converting HTML into text.")
-(defcustom gnus-use-idna (condition-case nil (require 'idna) (file-error))
+(defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error))
+ (fboundp 'coding-system-p)
+ (coding-system-p 'utf-8))
"Whether IDNA decoding of headers is used when viewing messages.
This requires GNU Libidn, and by default only enabled if it is found."
:group 'gnus-article-headers
:link '(custom-manual "(message)News Headers")
:type 'string)
-(defcustom message-use-idna 'ask
+(defcustom message-use-idna (and (condition-case nil (require 'idna)
+ (file-error))
+ (fboundp 'coding-system-p)
+ (coding-system-p 'utf-8)
+ 'ask)
"Whether to encode non-ASCII in domain names into ASCII according to IDNA."
:group 'message-headers
:type '(choice (const :tag "Ask" ask)
"Possibly IDNA encode non-ASCII domain names in From:, To: and Cc: headers.
See `message-idna-encode'."
(interactive)
- (when (condition-case nil (require 'idna) (file-error))
+ (when message-use-idna
(save-excursion
(save-restriction
(message-narrow-to-head)