1 |
;;; rfc1843.el --- HZ (rfc1843) decoding |
;;; rfc1843.el --- HZ (rfc1843) decoding |
2 |
;; Copyright (c) 1998, 1999, 2000 Free Software Foundation, Inc. |
;; Copyright (c) 1998, 1999, 2000, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> |
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> |
5 |
;; Keywords: news HZ HZ+ mail i18n |
;; Keywords: news HZ HZ+ mail i18n |
43 |
|
|
44 |
(defvar rfc1843-hzp-word-regexp |
(defvar rfc1843-hzp-word-regexp |
45 |
"~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\ |
"~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\ |
46 |
[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") |
\[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") |
47 |
|
|
48 |
(defvar rfc1843-hzp-word-regexp-strictly |
(defvar rfc1843-hzp-word-regexp-strictly |
49 |
"~\\({\\([\041-\167][\041-\176]\\)+\\|\ |
"~\\({\\([\041-\167][\041-\176]\\)+\\|\ |
50 |
[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") |
\[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") |
51 |
|
|
52 |
(defcustom rfc1843-decode-loosely nil |
(defcustom rfc1843-decode-loosely nil |
53 |
"Loosely check HZ encoding if non-nil. |
"Loosely check HZ encoding if non-nil. |
54 |
When it is set non-nil, only buffers or strings with strictly |
When it is set non-nil, only buffers or strings with strictly |
55 |
HZ-encoded are decoded." |
HZ-encoded are decoded." |
56 |
:type 'boolean |
:type 'boolean |
57 |
:group 'gnus) |
:group 'mime) |
58 |
|
|
59 |
(defcustom rfc1843-decode-hzp t |
(defcustom rfc1843-decode-hzp t |
60 |
"HZ+ decoding support if non-nil. |
"HZ+ decoding support if non-nil. |
64 |
The document of HZ+ 0.78 specification can be found at |
The document of HZ+ 0.78 specification can be found at |
65 |
ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" |
ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" |
66 |
:type 'boolean |
:type 'boolean |
67 |
:group 'gnus) |
:group 'mime) |
68 |
|
|
69 |
(defcustom rfc1843-newsgroups-regexp "chinese\\|hz" |
(defcustom rfc1843-newsgroups-regexp "chinese\\|hz" |
70 |
"Regexp of newsgroups in which might be HZ encoded." |
"Regexp of newsgroups in which might be HZ encoded." |
71 |
:type 'string |
:type 'string |
72 |
:group 'gnus) |
:group 'mime) |
73 |
|
|
74 |
(defun rfc1843-decode-region (from to) |
(defun rfc1843-decode-region (from to) |
75 |
"Decode HZ in the region between FROM and TO." |
"Decode HZ in the region between FROM and TO." |