Gnus development mailing list
 help / color / mirror / Atom feed
* patch : charset for text/html
@ 1999-05-06  4:11 Shenghuo ZHU
  1999-05-06 13:06 ` luis fernandes
  1999-06-12 22:56 ` Searching and decoding (was: patch : charset for text/html) Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Shenghuo ZHU @ 1999-05-06  4:11 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 187 bytes --]


Charset for inline text/html does not work. Here is a patch.

Wed May  5 13:51:13 1999  Shenghuo ZHU  <zsh@cs.rochester.edu>

	* mm-view.el (mm-inline-text): Fix charset for text/html.


[-- Attachment #2: 84-zsh5.diff --]
[-- Type: application/octet-stream, Size: 1984 bytes --]

--- mm-view.el	1999/05/05 17:25:02	1.1
+++ mm-view.el	1999/05/05 17:49:40
@@ -65,11 +65,21 @@
 	    (url-standalone-mode t)
 	    (url-current-object
 	     (url-generic-parse-url (format "cid:%s" (mm-handle-id handle))))
-	    (width (window-width)))
+	    (width (window-width))
+	    (charset (mail-content-type-get
+		      (mm-handle-type handle) 'charset)))
 	(save-excursion
 	  (insert text)
 	  (save-restriction
 	    (narrow-to-region b (point))
+	    (goto-char (point-min))
+	    (if (or (re-search-forward w3-meta-content-type-charset-regexp nil t)
+		    (re-search-forward w3-meta-charset-content-type-regexp nil t))
+		(setq charset (w3-coding-system-for-mime-charset 
+			       (buffer-substring-no-properties 
+				(match-beginning 2) 
+				(match-end 2)))))
+	    (mm-decode-body charset)
 	    (save-window-excursion
 	      (let ((w3-strict-width width)
 		    (url-standalone-mode t))

--- lpath.el	1999/05/05 18:05:31	1.2
+++ lpath.el	1999/05/05 18:02:50
@@ -37,6 +37,7 @@
 		     find-charset-region
 		     find-coding-systems-region get-charset-property
 		     coding-system-get w3-region
+		     w3-coding-system-for-mime-charset 
 		     rmail-summary-exists rmail-select-summary
 		     rmail-update-summary url-retrieve
 		     temp-directory
@@ -51,6 +52,8 @@
 		    adaptive-fill-first-line-regexp adaptive-fill-regexp
 		    url-current-mime-headers buffer-file-coding-system
 		    w3-image-mappings url-current-mime-type
+		    w3-meta-content-type-charset-regexp
+		    w3-meta-charset-content-type-regexp
 		    url-current-callback-func url-current-callback-data
 		    url-be-asynchronous temporary-file-directory)))
   (maybe-bind '(mail-mode-hook
@@ -78,6 +81,7 @@
 		 annotationp delete-annotation make-image-specifier
 		 make-annotation
 		 w3-do-setup w3-region
+		 w3-coding-system-for-mime-charset 
 		 rmail-summary-exists rmail-select-summary rmail-update-summary
 		 url-generic-parse-url valid-image-instantiator-format-p
 		 )))

[-- Attachment #3: Type: text/plain, Size: 19 bytes --]



-- 
Shenghuo ZHU

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-07-03 10:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-06  4:11 patch : charset for text/html Shenghuo ZHU
1999-05-06 13:06 ` luis fernandes
1999-05-06 13:17   ` Colin Rafferty
1999-05-06 15:36     ` François Pinard
1999-05-07 10:51     ` Jan Vroonhof
1999-06-12 22:56 ` Searching and decoding (was: patch : charset for text/html) Lars Magne Ingebrigtsen
1999-06-17 14:12   ` Robert Bihlmeyer
1999-07-03 10:16     ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).