[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

shimbun.el: ISO-2022-JP as default Content-type charset?

Dear emacs-w3m developers,

I think I've found a bug or at least something that should be
made customizable.

I use Shimbun's `rss-hash' backend to read articles with
cyrillic and occasionally CJK characters, almost always
encoded in utf-8 nowdays.

With default setup I get

  Content-Type: text/html; charset=ISO-2022-JP

in header, and thus unreadable garbled body, filled with
something like

  $,1(>(b(Z(`(k([(j(B $,1(T([(o(B $,1(a(U(Q(o(B

When default charset changed to utf-8, articles are displayed

cvs diff: Diffing .
Index: shimbun.el
RCS file: /storage/cvsroot/emacs-w3m/shimbun/shimbun.el,v
retrieving revision 1.173
diff -u -a -r1.173 shimbun.el
--- shimbun.el	9 Aug 2007 14:47:05 -0000	1.173
+++ shimbun.el	21 Aug 2007 04:15:43 -0000
@@ -1105,7 +1105,7 @@
   "Insert headers which are generated from SHIMBUN and HEADER, and
 return the contents of this buffer as an encoded string."
   (unless charset
-    (setq charset "ISO-2022-JP"))
+    (setq charset "utf-8"))
   (goto-char (point-min))
   (shimbun-header-insert shimbun header)
   (insert "Content-Type: text/" (if html "html" "plain") "; charset=" charset