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

* Re: patch : charset for text/html
  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-06-12 22:56 ` Searching and decoding (was: patch : charset for text/html) Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: luis fernandes @ 1999-05-06 13:06 UTC (permalink / raw)


>>>>> "ZSH" == Shenghuo ZHU <zsh@cs.rochester.edu> writes:

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

When I read the words "here is a patch" (quite possibly, the 4
sweetest you can say to a developer (while not in bed, anyway)) I had
to post this list that, once upon a time, Per helped me with:

E-mail that developers receive can be categorized as follows (ordered
from least encouraging to most encouraging; too many from the
beginning of the list will make you want to give up writing free
software):

1. Your program didn't compile. Do you know why?
2. I didn't read the README file, how do I install your
    software?
3. I'm too lazy to read the documentation, how do I use this feature?
4. The documentation for using this feature is unclear.
5. Can you add this feature?
6. Your program doesn't work.
7. Thanks for writing this cool software.
8. The documentation for using this feature is unclear, here is
   a fix.   
9. There's a bug in your cool software, and here's the patch.
10. Here's some code that implements a new feature and makes your
software even cooler.



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

* Re: patch : charset for text/html
  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
  0 siblings, 2 replies; 8+ messages in thread
From: Colin Rafferty @ 1999-05-06 13:17 UTC (permalink / raw)


luis fernandes writes:

> E-mail that developers receive can be categorized as follows (ordered
> from least encouraging to most encouraging; too many from the
> beginning of the list will make you want to give up writing free
> software):

I noticed that it's also ordered from most likely to least likely.

-- 
Colin


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

* Re: patch : charset for text/html
  1999-05-06 13:17   ` Colin Rafferty
@ 1999-05-06 15:36     ` François Pinard
  1999-05-07 10:51     ` Jan Vroonhof
  1 sibling, 0 replies; 8+ messages in thread
From: François Pinard @ 1999-05-06 15:36 UTC (permalink / raw)


Colin Rafferty <craffert@ms.com> writes:

> luis fernandes writes:

> > E-mail that developers receive can be categorized as follows (ordered
> > from least encouraging to most encouraging; too many from the
> > beginning of the list will make you want to give up writing free
> > software):

> I noticed that it's also ordered from most likely to least likely.

Let me disagree a bit, Colin.  Of course, sometimes, there are a few
clue-less reports.  Yet, in my average experience as a package maintainer,
I should say that most reports are to the point, and made by serious people.
I've never been tempted to give out of the duty because of users.  All the
contrary, interaction with users give me the incentive I need, and I'm
even attached to them, like if they were some kind of collective friend.

Consider this `ding' list, which is one good device between Lars and his
users.  I find most interactions here to be of high quality and (once my
own writings subtracted :-) not that noisy!

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard


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

* Re: patch : charset for text/html
  1999-05-06 13:17   ` Colin Rafferty
  1999-05-06 15:36     ` François Pinard
@ 1999-05-07 10:51     ` Jan Vroonhof
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Vroonhof @ 1999-05-07 10:51 UTC (permalink / raw)


Colin Rafferty <craffert@ms.com> writes:

> 
> I noticed that it's also ordered from most likely to least likely.

No it isn't :-) Documentation patches are much rarer then new features or 
bufixes...

Jan

P.S. I couldn't help thinking about your history of a bug report slide
from m17n99 when I read that list.




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

* Searching and decoding (was: patch : charset for text/html)
  1999-05-06  4:11 patch : charset for text/html Shenghuo ZHU
  1999-05-06 13:06 ` luis fernandes
@ 1999-06-12 22:56 ` Lars Magne Ingebrigtsen
  1999-06-17 14:12   ` Robert Bihlmeyer
  1 sibling, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-06-12 22:56 UTC (permalink / raw)


Shenghuo ZHU <zsh@cs.rochester.edu> writes:

> Content-Type: application/octet-stream
> Content-Disposition: attachment; filename=84-zsh5.diff
> Content-Transfer-Encoding: base64

Anyway, I usually search for patches by doing `M-s ^--- RET' (when
I've not read mail for a few (*cough*) days) so that I can apply them
all before I start actually reading the mail backlog.  That worked
perfectly until we started doing all this MIME stuff, but now some
patches are encoded in such a way that that no longer works.

Which brings me to the general question -- should `M-s' do some
decoding?  And, if so, what should it do?  I mean, since this example
is an attachment, it wouldn't be displayed in the article buffer in
any case, so `M-s' wouldn't have found it.  One could decode the
messages and display all the parts, but...  And decoding anything
while searching is liable to be s-l-o-o-o-o-o-w.  

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Searching and decoding (was: patch : charset for text/html)
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Bihlmeyer @ 1999-06-17 14:12 UTC (permalink / raw)


Hi,

>>>>> On 13 Jun 1999 00:56:00 +0200
>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> said:

 Lars> Which brings me to the general question -- should `M-s' do some
 Lars> decoding? And, if so, what should it do? I mean, since this
 Lars> example is an attachment, it wouldn't be displayed in the
 Lars> article buffer in any case, so `M-s' wouldn't have found it.
 Lars> One could decode the messages and display all the parts, but...
 Lars> And decoding anything while searching is liable to be
 Lars> s-l-o-o-o-o-o-w.

Hmm, there are only a handfull of possible encodings. One could encode 
the search string, and take this to sift out a big number of
non-matches.

E.g. a search for " -=-" would expand to a search for

 -=-
or
\( \|=20\)\(-\|=2[dD]\)=3[dD]\(-\|=2[dD]\)
or
IC09L\|AtPS0\|gLT0t

matching any of these alternative would find the string in plain, q-p,
and b64 encodings.

Would this be viable?

	Robbe

-- 
Robert Bihlmeyer	reads: Deutsch, English, MIME, Latin-1, NO SPAM!
<robbe@orcus.priv.at>	<http://stud2.tuwien.ac.at/~e9426626/sig.html>


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

* Re: Searching and decoding (was: patch : charset for text/html)
  1999-06-17 14:12   ` Robert Bihlmeyer
@ 1999-07-03 10:16     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-07-03 10:16 UTC (permalink / raw)


Robert Bihlmeyer <e9426626@stud2.tuwien.ac.at> writes:

> Hmm, there are only a handfull of possible encodings. One could encode 
> the search string, and take this to sift out a big number of
> non-matches.

Jabut the search string isn't a string; it's a regexp.  Which makes
things rather difficult.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ 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).