Gnus development mailing list
 help / color / mirror / Atom feed
* Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
@ 1999-12-23  1:49 Georges KO
  1999-12-23  5:45 ` Georges KO
  1999-12-23  9:53 ` Kai Großjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Georges KO @ 1999-12-23  1:49 UTC (permalink / raw)



    Hello folks,

    I have problems with the » character in some of the
gnus-...-regexp on my machine at home: » and the following character
are interpreted as a Chinese Big5 character, causing errors. For
example, gnus-cite-prefix-regexp is:

"^[]>»|:}+ ]*[]>»|:}+]\\(.*>»\\)?\\|^.*>"

    but:

"^[]>»|:}+ ]*[]>»|:}+]\\(.*>»\\)?\\|^.*>"
     ^^         ^^          ^^

    the underlined pairs of characters are interpreted as Big5: the
third pair makes the regexp incorrect, as it eats the escaping \
(well, it may come from my setup).

    Another problem I have is with MIME: sometimes, I have the
following button:

[2. image/jpeg; =?big5?B?rNm5cS5qcGc=?=]...

    which cannot be saved (without modifying the name) for viewing...

    Georges.
-- 
 Georges KO      Alcatel Telecom Taiwan      gko@alcatel.com.tw / gko@gko.net




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

* Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
  1999-12-23  1:49 Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME Georges KO
@ 1999-12-23  5:45 ` Georges KO
  1999-12-23  9:53 ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Georges KO @ 1999-12-23  5:45 UTC (permalink / raw)


Georges KO <gko@gko.net> writes:

>     Another problem I have is with MIME: sometimes, I have the
> following button:
> 
> [2. image/jpeg; =?big5?B?rNm5cS5qcGc=?=]...
> 
>     which cannot be saved (without modifying the name) for viewing...

    To display and save it, I have added
mail-decode-encoded-word-string in gnus-insert-mime-button and
mm-save-part: 

(defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed)
  (let ((gnus-tmp-name
	 (mail-decode-encoded-word-string
	  (or (mail-content-type-get (mm-handle-type handle)
...

(defun mm-save-part (handle)
  "Write HANDLE to a file."
  (let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
	 (filename (mail-decode-encoded-word-string
		    (mail-content-type-get
		     (mm-handle-disposition handle) 'filename)))
...

    To view the contents, I can save in the temporary directory, but I
have problems when start-process is called in mm-display-external. I
moved the filename stuff in the front: 

(defun mm-display-external (handle method)
  "Display HANDLE using METHOD."
  (let* ((filename (mail-decode-encoded-word-string
		   (mail-content-type-get
		    (mm-handle-disposition handle) 'filename)))
	 (dir (make-temp-name (expand-file-name "emm." mm-tmp-directory)))
	 (file (if filename
		   (expand-file-name (file-name-nondirectory filename)
				     dir)
		 (make-temp-name (expand-file-name "mm." dir)))))
    (mm-with-unibyte-buffer
     (if (functionp method)
...

    But when start-process is called, it seems not to pass Big5
characters to the sub-process. I added coding-system-for-write, where
file-name-coding-system is 'cn-big5:

(let ((coding-system-for-write file-name-coding-system))
  (start-process "*display*"    
		 (setq buffer
		       (generate-new-buffer "*mm*"))
		 shell-file-name
		 shell-command-switch
		 (mm-mailcap-command
		  method file (mm-handle-type handle))))

    but it doesn't work. I tried in *scratch* the same expression
but with (mm-mailcap-...) replaced by some string it returned and
it worked... Why ?
-- 
 Georges KO      Alcatel Telecom Taiwan      gko@alcatel.com.tw / gko@gko.net
              Cycle 78, year 16 (Ji-Mao), month 11 (Bing-Zi), day 16 (Ji-You)




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

* Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
  1999-12-23  1:49 Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME Georges KO
  1999-12-23  5:45 ` Georges KO
@ 1999-12-23  9:53 ` Kai Großjohann
  1999-12-23 10:16   ` Georges KO
  1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 1999-12-23  9:53 UTC (permalink / raw)
  Cc: ding

Georges KO <gko@gko.net> writes:

>     I have problems with the » character in some of the
> gnus-...-regexp on my machine at home: » and the following character
> are interpreted as a Chinese Big5 character, causing errors.

Where are these regexes stored?  Are they in some *.el files from Gnus
itself, or did you change the regexes in ~/.gnus?  Or is it in
~/.newsrc.eld?

Maybe Lars should add a -*- coding: latin1 -*- to the gnus*.el files
which contain non-ASCII characters?

kai
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
  1999-12-23  9:53 ` Kai Großjohann
@ 1999-12-23 10:16   ` Georges KO
  1999-12-23 11:17     ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Georges KO @ 1999-12-23 10:16 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Where are these regexes stored?  

    In gnus-cite.el.

> Maybe Lars should add a -*- coding: latin1 -*- to the gnus*.el files
> which contain non-ASCII characters?

    Yeah, that should be the best way...
-- 
 Georges KO      Alcatel Telecom Taiwan      gko@alcatel.com.tw / gko@gko.net
              Cycle 78, year 16 (Ji-Mao), month 11 (Bing-Zi), day 16 (Ji-You)




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

* Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
  1999-12-23 10:16   ` Georges KO
@ 1999-12-23 11:17     ` Kai Großjohann
  1999-12-23 19:28       ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 1999-12-23 11:17 UTC (permalink / raw)
  Cc: ding

Georges KO <gko@gko.net> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> 
> > Maybe Lars should add a -*- coding: latin1 -*- to the gnus*.el files
> > which contain non-ASCII characters?
> 
>     Yeah, that should be the best way...

So, could anybody with CVS access do that?  (I don't have that
access.)

And what happens when you byte-compile a file with such a tag in it?
Will the *.elc file be okay for all language environments?

kai
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
  1999-12-23 11:17     ` Kai Großjohann
@ 1999-12-23 19:28       ` Florian Weimer
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Weimer @ 1999-12-23 19:28 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Georges KO <gko@gko.net> writes:
> 
> > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> > 
> > > Maybe Lars should add a -*- coding: latin1 -*- to the gnus*.el files
> > > which contain non-ASCII characters?
> > 
> >     Yeah, that should be the best way...
> 
> So, could anybody with CVS access do that?

Done.

> And what happens when you byte-compile a file with such a tag in it?
> Will the *.elc file be okay for all language environments?

Yes, they should.  After all, all those nifty input methods wouldn't
work at all, would they?




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

end of thread, other threads:[~1999-12-23 19:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-23  1:49 Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME Georges KO
1999-12-23  5:45 ` Georges KO
1999-12-23  9:53 ` Kai Großjohann
1999-12-23 10:16   ` Georges KO
1999-12-23 11:17     ` Kai Großjohann
1999-12-23 19:28       ` Florian Weimer

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