;ELC   
;;; Compiled by amu@daemon on Thu Jan 11 15:04:14 2001
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.8.8/lisp/rfc2047.el
;;; in Emacs version 20.7.2
;;; with bytecomp version 2.56
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`rfc2047.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\307\310\311\"\207" [require qp mm-util ietf-drums mail-prsvr base64 gnus-util autoload mm-body-7-or-8 "mm-bodies"] 3)
#@461 *Header/encoding method alist.
The list is traversed sequentially.  The keys can either be
header regexps or t.

The values can be:

1) nil, in which case no encoding is done;
2) `mime', in which case the header will be encoded according to RFC2047;
3) a charset, in which case it will be encoded as that charset;
4) `default', in which case the field will be encoded as the rest
   of the article.
5) a string, like `mime', expect for using it as word-chars.
(defvar rfc2047-header-encoding-alist '(("Newsgroups") ("Message-ID") ("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|Reply-To\\|Sender\\)" . "-A-Za-z0-9!*+/=_") (t . mime)) (#$ . -834))
#@84 Alist of MIME charsets to RFC2047 encodings.
Valid encodings are nil, `Q' and `B'.
(defvar rfc2047-charset-encoding-alist '((us-ascii) (iso-8859-1 . Q) (iso-8859-2 . Q) (iso-8859-3 . Q) (iso-8859-4 . Q) (iso-8859-5 . B) (koi8-r . B) (iso-8859-7 . Q) (iso-8859-8 . Q) (iso-8859-9 . Q) (iso-8859-14 . Q) (iso-8859-15 . Q) (iso-2022-jp . B) (iso-2022-kr . B) (gb2312 . B) (cn-gb . B) (cn-gb-2312 . B) (euc-kr . B) (iso-2022-jp-2 . B) (iso-2022-int-1 . B)) (#$ . 1481))
#@51 Alist of RFC2047 encodings to encoding functions.
(defvar rfc2047-encoding-function-alist '((Q . rfc2047-q-encode-region) (B . rfc2047-b-encode-region) (nil . ignore)) (#$ . 1953))
#@49 Alist of header regexps and valid Q characters.
(defvar rfc2047-q-encoding-alist '(("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|Reply-To\\|Sender\\):" . "-A-Za-z0-9!*+/") ("." . "\n\f -<>@-^`-")) (#$ . 2140))
#@54 Narrow the buffer to the header on the current line.
(defalias 'rfc2047-narrow-to-field #[nil "\300y\210`\301y\210\302\303\304\305#\203 \300y\210`\202 d}\210eb\207" [0 1 re-search-forward "^[^ \n	]" nil t] 5 (#$ . 2354)])
#@127 Encode the message header according to `rfc2047-header-encoding-alist'.
Should be called narrowed to the head of the message.
(defalias 'rfc2047-encode-message-header #[nil "\212eb\210\306\211\211m?\205\371 \214\307 \210\310 \204F \311 \312=\203\362 \313\314!\204/ \315\303!\203/ \2022 \313\316!\203\362 \317\f@!\203\362 \320ed\f@#\210\202\362 \306\n\211A@\211\203p 	@;\203a \321	@!\204h 	@\322=\203J \306	A\202J ;\203~ \323ed#\210\202\362 \324=\203\214 \323ed\"\210\202\362 \325=\203\262 \313\316!\203\362 \315\326!\203\362 \203\362 \203\362 \320ed#\210\202\362 \204\325 \327\330\331ed\"\"\203\362 \332\333!\203\316 \323ed\"\210\202\362 \334\335!\210\202\362 \317!\203\362 \313\316!\203\362 \315\326!\203\362 \203\362 \320ed#\210db\210)\202\n ,\207" [method elem alist enable-multibyte-characters message-posting-charset rfc2047-header-encoding-alist nil rfc2047-narrow-to-field rfc2047-encodable-p mm-body-7-or-8 8bit featurep xemacs boundp mule mm-coding-system-p mm-encode-coding-region looking-at t rfc2047-encode-region mime default default-enable-multibyte-characters delq ascii mm-find-charset-region y-or-n-p "Some texts are not encoded. Encode them anyway?" error "Cannot send unencoded text." mail-parse-charset] 5 (#$ . 2585) "*"])
#@106 Return non-nil if any characters in current buffer need encoding in headers.
The buffer may be narrowed.
(defalias 'rfc2047-encodable-p #[nil "\304\305\306ed\"\"\307@D\310\203\" \211A@\n>\204 \311\202 	+\207" [message-posting-charset found cs charsets mapcar mm-mime-charset mm-find-charset-region us-ascii nil t] 5 (#$ . 3862)])
#@48 Dissect the region between B and E into words.
(defalias 'rfc2047-dissect-region #[(b e &optional word-chars) "\204 \306\307\211\211\211\211\211\214}\210eb\210\310\307w\210m\204{ `x\210`=\204< `{\307BB`\fb\210\311 \312u\210\307w\210m\204a \311 =\203a \312u\210\307w\210\202L `=\204q `{BB`\310\307w\210\202! `=\204\213 `{\307BB)\211A@	\203\372 	A\203\354 @@\203\354 @A\204\354 \313\314@@\"\204\354 A@A	A=\203\323 A@@@@	@Q	ABA\211\211A\210\202\222 @@	@P	AB\nBA\211\211A@\211\202\223 	\nB\211A@\211\204\226 \n.\207" [word-chars word result current point words "\n\f!-" nil " -" mm-charset-after 1 string-match "[^ 	]" mail-parse-mule-charset b e] 7 (#$ . 4208)])
#@39 Encode all encodable words in region.
(defalias 'rfc2047-encode-region #[(b e &optional word-chars) "\305	\n#\306\214	}\210ed|\210\f\211A@\211\203X A\204' @c\210\202 \307\310 `\"\210db\210`\214~\210\310 )Z\311V\203@ \312c\210\313 \314=\203J \315c\210\316`@c\210`A#\210\202 \307ed\"+\207" [b e word-chars word words rfc2047-dissect-region nil rfc2047-fold-region gnus-point-at-bol 76 "\n " char-before 61 " " rfc2047-encode] 4 (#$ . 4946)])
#@25 Encode words in STRING.
(defalias 'rfc2047-encode-string #[(string &optional word-chars) "\303\304\305!!\306\216rq\210	c\210\307ed\n#\210\310 +\207" [#1=#:temp-buffer string word-chars get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) rfc2047-encode-region buffer-string] 4 (#$ . 5404)])
#@52 Encode the word in the region B to E with CHARSET.
(defalias 'rfc2047-encode #[(b e charset) "\306!\211\n\236A\206\f \307\310\311	!\227\312\311!\227\312\260\313\214}\210\307=\203B eb\210m\204B d`\314\\^b\210m\204- \315c\210\202- \316\317!\204S \320\321!\203S \202V \316\322!\203e \323	!\203e \324ed	#\210\236Aed\"\210eb\210m?\205\216 \204} \325c\210\326\fc\210\326\210\327c\210\330y\210\202q -\207" [charset mime-charset rfc2047-charset-encoding-alist encoding start first mm-mime-charset B "=?" symbol-name "?" t 15 "\n" featurep xemacs boundp enable-multibyte-characters mule mm-coding-system-p mm-encode-coding-region " " nil "?=" 1 b e rfc2047-encoding-function-alist] 6 (#$ . 5783)])
#@32 Fold long lines in the region.
(defalias 'rfc2047-fold-region #[(b e) "\214	}\210eb\210\305\211\214~\210\306 )m\204\260 \f\204 \203? `\nZ\307V\203? \f\206, b\210\305\305\310c\210`S\311\305w\210\312u\210\305f\313=\203d \312u\210`\305\305\311\305w\210m\204 \305f\313=\204 \312u\210\202 \305f\314=\203q \312u\210\202 \305f\315>\203\202 \311\305w\210`S\202 \f\204\251 \316\317!\204\240 \305f\320=\203\231 \312u\210\202 \321\305w\210\202 `\322\305w\210\202 \322\305w\210\202 \f\204\270 \205\327 `\nZ\307V\205\327 \f\206\305 b\210\305\305\310c\210`S\311\305w\210\312u,\207" [b e bol qword-break break nil gnus-point-at-bol 76 "\n " " 	" 1 10 13 (32 9) looking-at "=\\?[^=]" 61 "^ 	\n=" "^ 	\n"] 3 (#$ . 6498)])
#@29 Unfold lines in the region.
(defalias 'rfc2047-unfold-region #[(b e) "\214	}\210eb\210\214~\210\305 )\306 \307\310y\210m?\205L \311\312!\210\313\225\313\224Z\306 \fZ\nZ\314W\203@ b\210\315\307w\210`S|\210\202C \305 \306 \310y\210\202 ,\207" [b e leading eol bol gnus-point-at-bol gnus-point-at-eol nil 1 looking-at "[ 	]*" 0 76 "[ 	\n]+"] 3 (#$ . 7240)])
#@54 Base64-encode the header contained in region B to E.
(defalias 'rfc2047-b-encode-region #[(b e) "\214b	}\210m?\205& \302`\303\210`\304#\210n\203  l\203  \305\306!\210\303y\210\202 )\207" [b e base64-encode-region nil t delete-backward-char 1] 4 (#$ . 7612)])
#@54 Quoted-printable-encode the header in region B to E.
(defalias 'rfc2047-q-encode-region #[(b e) "\212\214b	}\210\n\214~\210\305 )\f\2036 \306\f@@!\203. \307	\310\f@A$\210\311ed\312\313$\210\310\f\211A\210\202 deZ\314W?\205l eTb\210o?\205l m?\205l d\314\\^b\210\315\316`\317Z\320#\210o\204C m\204C \321c\210`\202C ,\207" [b e rfc2047-q-encoding-alist bol alist gnus-point-at-bol looking-at quoted-printable-encode-region nil subst-char-in-region 32 95 56 search-backward "=" 2 t "\n"] 5 (#$ . 7880)])
(byte-code "\302\300!\204 \303\300	B\302\207" [rfc2047-encoded-word-regexp current-load-list boundp "=\\?\\([^][ - ()<>@,;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\\?\\([!->@-~ +]*\\)\\?="] 2)
#@60 Decode MIME-encoded words in region between START and END.
(defalias 'rfc2047-decode-region #[(start end) "\306\307\211\212\214\f}\210eb\210\310\311\312\313\311\312\260\307\306#\203) \314\225b\315\224|\210\202 eb\310\307\306#\203s \316\224\317\320\316!\316\224\316\225|\210!c\210\321\322!\204U \323\324!\203U \202X \321\325!\203n \203n \326=\204n \327	#\210`\202, \321\322!\204\204 \323\324!\203\204 \202\207 \321\325!\203\244 \203\244 \330=\204\244 \326=\204\244 \327	d#\210\331ed\"-\207" [e b case-fold-search start end rfc2047-encoded-word-regexp t nil re-search-forward "\\(" "\\)" "\\(\n?[ 	]\\)+" 1 6 0 rfc2047-parse-and-decode match-string featurep xemacs boundp enable-multibyte-characters mule gnus-decoded mm-decode-coding-region us-ascii rfc2047-unfold-region mail-parse-charset] 8 (#$ . 8578) "r"])
#@68 Decode the quoted-printable-encoded STRING and return the results.
(defalias 'rfc2047-decode-string #[(string) "\306\307!\204 \310\300!\203 \202 \306\311!\312\313\314!!\315\216r\nq\210	\203> \306\307!\204> \310\303!\203> \203> \316\317!\203> \317\320!\210\fc\210ed \320\321\211!\"#\212\214 }\210eb\210\322\323$\324\325\323$\324\260\321\320#\203u \326\225b\327\224|\210\202Y eb\"\322$\321\320#\203\304 \330\224!\331\332\330!\330\224\330\225|\210!c\210\306\307!\204\243 \310\300!\203\243 \202\246 \306\311!\203\276 %\203\276 %\333=\204\276 \334\"!%#\210`\"\202y \306\307!\204\324 \310\300!\203\324 \202\327 \306\311!\203\365 %\203\365 %\335=\204\365 %\333=\204\365 \334\"d%#\210\336ed\"-\210*\337 ,\207" [enable-multibyte-characters m #1=#:temp-buffer default-enable-multibyte-characters string end featurep xemacs boundp mule get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) fboundp set-buffer-multibyte t nil re-search-forward "\\(" "\\)" "\\(\n?[ 	]\\)+" 1 6 0 rfc2047-parse-and-decode match-string gnus-decoded mm-decode-coding-region us-ascii rfc2047-unfold-region buffer-string start e b case-fold-search rfc2047-encoded-word-regexp mail-parse-charset] 8 (#$ . 9426)])
#@73 Decode WORD and return it if it is an encoded word.
Return WORD if not.
(defalias 'rfc2047-parse-and-decode #[(word) "\302	\"\204	 	\207\303\304\305\217\206 	\207" [rfc2047-encoded-word-regexp word string-match nil (byte-code "\301\302\303\"\302\304\"\226\302\305\"#\207" [word rfc2047-decode match-string 1 2 3] 6) ((error word))] 3 (#$ . 10722)])
#@25 Pad STRING to quartets.
(defalias 'rfc2047-pad-base64 #[(string) "\302G\303\"\211\304=\203 \202/ 	\305=\203 \202/ 	\306=\203& \307P\202/ 	\310=\205/ \311P)\207" [string #1=#:G89064 mod 4 0 1 2 "==" 3 "="] 4 (#$ . 11082)])
#@162 Decode STRING from the given MIME CHARSET in the given ENCODING.
Valid ENCODINGs are "B" and "Q".
If your Emacs implementation can't decode CHARSET, return nil.
(defalias 'rfc2047-decode #[(charset encoding string) ";\203\n \306\227!\203  	\307=\204  \307	>\204  	>\203\" \n\310!\211\204= \203= 	<\203= \311	>\203= \310\n!\205\373 \312=\203M \n\203M \n\313\314!\204\300 \315\304!\203\300 \f\203\300 \316\317!\203\300 \316\320!\203\300 \321\3219\205u \322\300N!)\204\300 p \323\216\324!\317\324!\210\325\"\326\232\203\226 \327\330#!!\202\272 \"\331\232\203\265 \332#\333\334$%#\335%$##+!\202\272 \336\337\"\"\"+\202\373 \324!\325\"\326\232\203\324 \327\330#!!\202\370 \"\331\232\203\363 \332#\333\334$%#\335%$##+!\202\370 \336\337\"\"\"))\207" [charset mail-parse-ignored-charsets mail-parse-charset cs enable-multibyte-characters object intern gnus-all mm-charset-to-coding-system gnus-unknown ascii featurep xemacs boundp fboundp set-buffer-multibyte charsetp eight-bit-control vectorp ((byte-code "q\210\301\302!\207" [#1=#:buffer set-buffer-multibyte t] 2)) nil mm-decode-coding-string "B" base64-decode-string rfc2047-pad-base64 "Q" quoted-printable-decode-string 95 32 mm-subst-char-in-string error "Invalid encoding: %s" #1# default-enable-multibyte-characters encoding string to from] 7 (#$ . 11319)])
(provide 'rfc2047)
