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

Re: Failure to render latin1-encoded page properly.



In [emacs-w3m : No.11309] Štěpán Němec wrote:
> On this URL:
> http://www.jsoftware.com/help/dictionary/vocabul.htm

> Emacs-w3m displays the • chars (i.e. latin1 encoding of U+2022
> BULLET) as \225.
> Reloading as latin1 (using `C c') doesn't help.

A workaround patch follows.  I think we have to have the entities
tabel for such &#NUM; type symbols to which there're no synonyms
(like &#amp;, &#euro;, &#nbsp;, etc), not only for •.  I'm
going to talk with html experts.  Thanks.

--- w3m.el~	2010-08-17 01:15:58 +0000
(B+++ w3m.el	2010-08-18 00:18:11 +0000
(B@@ -2167,7 +2167,8 @@
(B 		    (("dagger" . 32) ("Dagger" . 33) ("permil" . 48)
(B 		     ("lsaquo" . 57) ("rsaquo" . 58)
(B 		     ("bull" . 34) ("hellip" . 38) ("prime" . 50) ("Prime" . 51)
(B-		     ("oline" . 62) ("frasl" . 68)))
(B+		     ("oline" . 62) ("frasl" . 68)
(B+		     ("#149" . 34)))
(B 	       (116 .
(B 		    (("euro" . 76)))))
(B 	    (greek '((39 . (("thetasym" . 81) ("upsih" . 82) ("piv" . 86)))))
(B@@ -3427,13 +3428,12 @@
(B   "Get a char corresponding to NAME from the html char entities database.
(B The database is kept in `w3m-entity-table'."
(B   ;; Return a value of the specified entity, or nil if it is unknown.
(B-  (if (eq (aref name 0) ?#)
(B-      (char-to-string (w3m-ucs-to-char
(B-		       (if (or (eq (aref name 1) ?x)
(B-			       (eq (aref name 1) ?X))
(B-			   (string-to-number (substring name 2) 16)
(B-			 (string-to-number (substring name 1)))))
(B-    (gethash name w3m-entity-table)))
(B+  (or (gethash name w3m-entity-table)
(B+      (and (eq (aref name 0) ?#)
(B+	   (char-to-string (w3m-ucs-to-char
(B+			    (if (memq (aref name 1) '(?X ?x))
(B+				(string-to-number (substring name 2) 16)
(B+			      (string-to-number (substring name 1))))))))
(B 
(B (defun w3m-fontify-bold ()
(B   "Fontify bold text in the buffer containing halfdump."