Changes committed gnus/lisp (ChangeLog nnimap.el)
"Reiner Steib" <[email protected]> Sat, 29 Nov 2008 16:25:47 +0100
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog nnimap.el (nnimap-demule-use-string-to-multibyte): New temporary variable for debugging bug#464 and bug#1174. (nnimap-demule): Use it. Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.1932 gnus/lisp/ChangeLog:7.1933 --- ChangeLog:7.1932 Mon Nov 24 21:15:36 2008 +++ ChangeLog Sat Nov 29 16:25:47 2008 @@ -1,3 +1,9 @@ +2008-11-29 Reiner Steib <[email protected]> + + * nnimap.el (nnimap-demule-use-string-to-multibyte): New temporary + variable for debugging bug#464 and bug#1174. + (nnimap-demule): Use it. + 2008-11-24 Reiner Steib <[email protected]> * gnus-score.el (gnus-score-find-trace): Handle default score in total Index: nnimap.el diff -u gnus/lisp/nnimap.el:7.53 gnus/lisp/nnimap.el:7.54 --- nnimap.el:7.53 Fri Jul 4 02:09:29 2008 +++ nnimap.el Sat Nov 29 16:25:47 2008 @@ -901,12 +901,35 @@ (when (nnimap-possibly-change-server server) (nnoo-status-message 'nnimap server))) +(defvar nnimap-demule-use-string-to-multibyte (fboundp 'string-to-multibyte) + "Temporary internal debug variable. +If you have problems (UTF-8 not decoded correctly on IMAP) with +the default value, please report it as a bug!") +;; FIXME: Clarify if we need to make this variable conditional on the Emacs +;; version (Emacs 22 vs. Emacs 23;Emacs 21 doesn't have `string-to-multibyte' +;; anyhow). --rsteib +;; +;; http://thread.gmane.org/gmane.emacs.gnus.general/67112 +;; (bug#464, reported by James Cloos) +;; http://thread.gmane.org/gmane.emacs.bugs/21524 +;; (bug#1174, reported by Frank Schmitt) + (defun nnimap-demule (string) ;; BEWARE: we used to use string-as-multibyte here which is braindead ;; because it will turn accidental emacs-mule-valid byte sequences ;; into multibyte chars. --Stef ;; Reverted, braindead got 7.5 out of 10 on imdb, so it can't be ;; that bad. --Simon + (gnus-message 9 "nnimap-demule-use-string-to-multibyte: %s" + nnimap-demule-use-string-to-multibyte) + (if nnimap-demule-use-string-to-multibyte + ;; Stefan + (funcall (if (and (fboundp 'string-to-multibyte) + (subrp (symbol-function 'string-to-multibyte))) + 'string-to-multibyte + 'identity) + (or string ""))) + ;; Simon (funcall (if (and (fboundp 'string-as-multibyte) (subrp (symbol-function 'string-as-multibyte))) 'string-as-multibyte