X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d8e9122115b5ffcec342c841b81cb2d2b8217e4b..0ff58f69651faa1aa36ff45d4012a19938642412:/lisp/gnus/rfc1843.el diff --git a/lisp/gnus/rfc1843.el b/lisp/gnus/rfc1843.el index cab2f4e751..ee2af4803f 100644 --- a/lisp/gnus/rfc1843.el +++ b/lisp/gnus/rfc1843.el @@ -1,6 +1,6 @@ ;;; rfc1843.el --- HZ (rfc1843) decoding -;; Copyright (C) 1998-2015 Free Software Foundation, Inc. +;; Copyright (C) 1998-2016 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: news HZ HZ+ mail i18n @@ -46,11 +46,11 @@ (defvar rfc1843-hzp-word-regexp "~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\ -\[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") +[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") (defvar rfc1843-hzp-word-regexp-strictly "~\\({\\([\041-\167][\041-\176]\\)+\\|\ -\[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") +[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") (defcustom rfc1843-decode-loosely nil "Loosely check HZ encoding if non-nil. @@ -90,12 +90,11 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" (while (re-search-forward (if rfc1843-decode-hzp rfc1843-hzp-word-regexp rfc1843-word-regexp) (point-max) t) - ;;; Text with extents may cause XEmacs crash (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1))) (setq firstc (aref str 0)) - (insert (mm-decode-coding-string + (insert (decode-coding-string (rfc1843-decode (prog1 (substring str 1)