Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-article-decode-charset
@ 2000-04-23 12:43 Roman Belenov
  2000-04-23 13:45 ` gnus-article-decode-charset Shenghuo ZHU
  0 siblings, 1 reply; 11+ messages in thread
From: Roman Belenov @ 2000-04-23 12:43 UTC (permalink / raw)


What is gnus-article-decode-charset intended for ? It seems that Gnus
automatically decodes text according to Content-type header; calling
this function seems to decode already decoded text making it
unreadable.

Is it possible to make this function always use original mail text as
the source for decoding, disregarding any transformations done before?
Sometimes I receive letters with wrong charset in Content-type;
Gnus misdecodes message text and trying to decode it with other coding
systems doesn't help.

-- 
 							With regards, Roman.




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

* Re: gnus-article-decode-charset
  2000-04-23 12:43 gnus-article-decode-charset Roman Belenov
@ 2000-04-23 13:45 ` Shenghuo ZHU
  2000-04-23 14:21   ` gnus-article-decode-charset Roman Belenov
  2000-04-23 21:06   ` gnus-article-decode-charset Kai Großjohann
  0 siblings, 2 replies; 11+ messages in thread
From: Shenghuo ZHU @ 2000-04-23 13:45 UTC (permalink / raw)


>>>>> "Roman" == Roman Belenov <roman@nstl.nnov.ru> writes:

Roman> What is gnus-article-decode-charset intended for ? It seems
Roman> that Gnus automatically decodes text according to Content-type
Roman> header; calling this function seems to decode already decoded
Roman> text making it unreadable.

Roman> Is it possible to make this function always use original mail
Roman> text as the source for decoding, disregarding any
Roman> transformations done before?  Sometimes I receive letters with
Roman> wrong charset in Content-type; Gnus misdecodes message text and
Roman> trying to decode it with other coding systems doesn't help.

If Gnus calls gnus-article-decode-charset twice on the same text, the
text could be double decoded. This should not happen unless you type
`W M c' or click the menu item.

If Gnus mis-decodes the message, you can use `0 g CHARSET' in the
summary buffer to re-decode (not double decode).

-- 
Shenghuo



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

* Re: gnus-article-decode-charset
  2000-04-23 13:45 ` gnus-article-decode-charset Shenghuo ZHU
@ 2000-04-23 14:21   ` Roman Belenov
  2000-04-23 21:06   ` gnus-article-decode-charset Kai Großjohann
  1 sibling, 0 replies; 11+ messages in thread
From: Roman Belenov @ 2000-04-23 14:21 UTC (permalink / raw)
  Cc: ding

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

> If Gnus calls gnus-article-decode-charset twice on the same text, the
> text could be double decoded. This should not happen unless you type
> `W M c' or click the menu item.

Yes, it doesn't happen automatically, I just tried to understand what
W M c does.

> If Gnus mis-decodes the message, you can use `0 g CHARSET' in the
> summary buffer to re-decode (not double decode).

Thanks, it's quite useful.

BTW IMHO it seems reasonable to mention this feature of
gnus-summary-show-article (decoding article using manually given
charset) in the "Charsets" section of the manual (Like "You can also
manually override charset setting for specific article - see
"Scrolling the article" section" somewhere in the 3rd paragraph).

-- 
 							With regards, Roman.




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

* Re: gnus-article-decode-charset
  2000-04-23 13:45 ` gnus-article-decode-charset Shenghuo ZHU
  2000-04-23 14:21   ` gnus-article-decode-charset Roman Belenov
@ 2000-04-23 21:06   ` Kai Großjohann
  2000-04-23 21:29     ` gnus-article-decode-charset Shenghuo ZHU
  1 sibling, 1 reply; 11+ messages in thread
From: Kai Großjohann @ 2000-04-23 21:06 UTC (permalink / raw)
  Cc: ding

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

> If Gnus mis-decodes the message, you can use `0 g CHARSET' in the
> summary buffer to re-decode (not double decode).

My Gnus (CVS from 10 minutes ago) doesn't seem to know about this
command.  In fact, after typing `C-h b' and searching for the string
`code', I only find `C-c C-c C-v' which has gnus-uu-something, and `W
M c' and `W M w'.

What does `O g' do?  Am I doing something wrong for not having it?

kai
-- 
Beware of flying birch trees.



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

* Re: gnus-article-decode-charset
  2000-04-23 21:06   ` gnus-article-decode-charset Kai Großjohann
@ 2000-04-23 21:29     ` Shenghuo ZHU
  2000-04-23 21:41       ` gnus-article-decode-charset Kai Großjohann
  0 siblings, 1 reply; 11+ messages in thread
From: Shenghuo ZHU @ 2000-04-23 21:29 UTC (permalink / raw)


>>>>> "KG" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

KG> Shenghuo ZHU <zsh@cs.rochester.edu> writes:
>> If Gnus mis-decodes the message, you can use `0 g CHARSET' in the
>> summary buffer to re-decode (not double decode).

KG> My Gnus (CVS from 10 minutes ago) doesn't seem to know about this
KG> command.  In fact, after typing `C-h b' and searching for the
KG> string `code', I only find `C-c C-c C-v' which has
KG> gnus-uu-something, and `W M c' and `W M w'.

KG> What does `O g' do?  Am I doing something wrong for not having it?

It is not `O', but a numeric argument of `g'
(gnus-summary-show-article).

-- 
Shenghuo



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

* Re: gnus-article-decode-charset
  2000-04-23 21:29     ` gnus-article-decode-charset Shenghuo ZHU
@ 2000-04-23 21:41       ` Kai Großjohann
  0 siblings, 0 replies; 11+ messages in thread
From: Kai Großjohann @ 2000-04-23 21:41 UTC (permalink / raw)
  Cc: ding

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

> It is not `O', but a numeric argument of `g'
> (gnus-summary-show-article).

00ps :-)

Thanks.

kai
-- 
Beware of flying birch trees.



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

* Re: gnus-article-decode-charset
  2006-10-25 19:20     ` gnus-article-decode-charset Reiner Steib
@ 2006-10-25 22:01       ` Miles Bader
  0 siblings, 0 replies; 11+ messages in thread
From: Miles Bader @ 2006-10-25 22:01 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:
> No, `gnus-summary-show-article-charset-alist' is only an abbreviation
> for frequently encountered charset.  If a number N is not present in
> `gnus-summary-show-article-charset-alist' (or if it's nil), `N g'
> prompts for a charset.  (But that's what the doc string says.  Didn't
> you read it or is it unclear?)

I just didn't read it ... :-)

That sounds good then, just `0 g' should work; I'll try that then, the
next time I run across a weird encoding problem.

Thanks,

-Miles
-- 
`Life is a boundless sea of bitterness'




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

* Re: gnus-article-decode-charset
  2006-10-25 17:32   ` gnus-article-decode-charset Miles Bader
@ 2006-10-25 19:20     ` Reiner Steib
  2006-10-25 22:01       ` gnus-article-decode-charset Miles Bader
  0 siblings, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2006-10-25 19:20 UTC (permalink / raw)


On Wed, Oct 25 2006, Miles Bader wrote:

> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>> In the situation you describe, I use `<prefix> g' (<menu-bar>
>> <Article> <Display> <View as different encoding>):
>
> That sounds pretty inconvenient though -- it looks like you need to
> _predefine_ the available character sets, and map them to an integer key
> (which makes them hard to remember).

No, `gnus-summary-show-article-charset-alist' is only an abbreviation
for frequently encountered charset.  If a number N is not present in
`gnus-summary-show-article-charset-alist' (or if it's nil), `N g'
prompts for a charset.  (But that's what the doc string says.  Didn't
you read it or is it unclear?)

E.g. I have ((12 . windows-1252) (0 . iso-8859-15) (8 . utf-8)) which
is easy to remember and sufficient for me.  I rarely need other
charsets.  (Of course, I mostly read articles with charsets typically
used in (Western) Europe.)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: gnus-article-decode-charset
  2006-10-25 14:58 ` gnus-article-decode-charset Reiner Steib
@ 2006-10-25 17:32   ` Miles Bader
  2006-10-25 19:20     ` gnus-article-decode-charset Reiner Steib
  0 siblings, 1 reply; 11+ messages in thread
From: Miles Bader @ 2006-10-25 17:32 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:
> In the situation you describe, I use `<prefix> g' (<menu-bar>
> <Article> <Display> <View as different encoding>):

That sounds pretty inconvenient though -- it looks like you need to
_predefine_ the available character sets, and map them to an integer key
(which makes them hard to remember).  That really isn't practical in my
experience (there are a _lot_ of random weird things I occasionally want
to decode).

-Miles
-- 
I'd rather be consing.




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

* Re: gnus-article-decode-charset
  2006-10-25 14:17 gnus-article-decode-charset Miles Bader
@ 2006-10-25 14:58 ` Reiner Steib
  2006-10-25 17:32   ` gnus-article-decode-charset Miles Bader
  0 siblings, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2006-10-25 14:58 UTC (permalink / raw)


On Wed, Oct 25 2006, Miles Bader wrote:

[ gnus-article-decode-charset ]
> Aka `(C-u) W M C' in summary buffer.
>
> I often try to use this command when a message I get is apparently
> mis-decoded (due to faulty header info or whatever), but it rarely
> seems to work like I expect it to, and often doesn't give useful
> results at all.  I'm wondering if I'm using it incorrectly, or
> whether it's broken.

I never use `gnus-article-decode-charset' so I don't know there's any
useful interactive use at all.  Anyone?

In the situation you describe, I use `<prefix> g' (<menu-bar>
<Article> <Display> <View as different encoding>):

,----[ (info "(gnus)Paging the Article") ]
| `A g'
| `g'
|      (Re)fetch the current article (`gnus-summary-show-article').  If
|      given a prefix, fetch the current article, but don't run any of the
|      article treatment functions.  This will give you a "raw" article,
|      just the way it came from the server.
| 
|      If given a numerical prefix, you can do semi-manual charset stuff.
|      `C-u 0 g cn-gb-2312 RET' will decode the message as if it were
|      encoded in the `cn-gb-2312' charset.  If you have
| 
|           (setq gnus-summary-show-article-charset-alist
|                 '((1 . cn-gb-2312)
|                   (2 . big5)))
| 
|      then you can say `C-u 1 g' to get the same effect.
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* gnus-article-decode-charset
@ 2006-10-25 14:17 Miles Bader
  2006-10-25 14:58 ` gnus-article-decode-charset Reiner Steib
  0 siblings, 1 reply; 11+ messages in thread
From: Miles Bader @ 2006-10-25 14:17 UTC (permalink / raw)


Aka `(C-u) W M C' in summary buffer.

I often try to use this command when a message I get is apparently
mis-decoded (due to faulty header info or whatever), but it rarely seems to
work like I expect it to, and often doesn't give useful results at all.
I'm wondering if I'm using it incorrectly, or whether it's broken.

The main problem is:  What version of the message does W M C operate on?

What I _expect_ is that it would

  (1) fetch the original message,
  (2) remove any mime wrapping like base-64, resulting in a unibyte buffer
      full of raw message bytes, and then
  (3) just call (decode-coding-region ... 'whatever)

Sometimes it appears to be trying to operate on whatever the currently
_displayed_ contents are, which is usually completely wrong.  If I try to
work around this by manually fetching the "original" message using `C-u g',
that usually fails to work too, either because the original is base-64
encoded, or even when that's not true, apparently because the way it
displays the raw bytes isn't what W M C is expecting.

Also, since I often need to guess and try several different encodings
before I find the proper one, it's generally more convenient if it starts
from the beginning each time (applying decoding X to the failed results of
decoding Y usually doesn't work very well :-).

Anyway, any comments on how this command does/should work?

Thanks,

-Miles

-- 
I'd rather be consing.




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

end of thread, other threads:[~2006-10-25 22:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-23 12:43 gnus-article-decode-charset Roman Belenov
2000-04-23 13:45 ` gnus-article-decode-charset Shenghuo ZHU
2000-04-23 14:21   ` gnus-article-decode-charset Roman Belenov
2000-04-23 21:06   ` gnus-article-decode-charset Kai Großjohann
2000-04-23 21:29     ` gnus-article-decode-charset Shenghuo ZHU
2000-04-23 21:41       ` gnus-article-decode-charset Kai Großjohann
2006-10-25 14:17 gnus-article-decode-charset Miles Bader
2006-10-25 14:58 ` gnus-article-decode-charset Reiner Steib
2006-10-25 17:32   ` gnus-article-decode-charset Miles Bader
2006-10-25 19:20     ` gnus-article-decode-charset Reiner Steib
2006-10-25 22:01       ` gnus-article-decode-charset Miles Bader

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