Thread View: news.software.readers
5 messages
5 total messages
Started by Stefan Ram
Tue, 23 Mar 2010 23:52
[slrn]save recoded bodies
Author: Stefan Ram
Date: Tue, 23 Mar 2010 23:52
Date: Tue, 23 Mar 2010 23:52
21 lines
2385 bytes
2385 bytes
In slrn, after having tagged articles with »#«, I can save them with »o«. This will save the headers and bodies as they came from the newsserver. The bodies have different »Content-Transfer-Encoding«s (7 bit, 8 bit, quoted-printable and base64) and different charsets (ISO-8859-16, ISO-8859-9, BIG5, ISO-8859-14, ISO-8859-4, ISO-8859-2, GB18030, ISO-8859-13, US-ASCII, ISO-8859-15 and last not least: UTF-8 AND ISO-8859-1). Can I asked slrn to save the bodies »decoded«? That is, first, decode all 7 bit, quoted-printable and base64 bodies to an 8 bit representation. Next recode all charsets to UTF-8 (replacing characters by »?« if they cannot be represented) or something similar to this? (Slrn must already know how to »decode« bodies as it can show me the bodies decoded.)
Re: [slrn]save recoded bodies
Author: Christian Ebert
Date: Wed, 24 Mar 2010 08:53
Date: Wed, 24 Mar 2010 08:53
35 lines
2793 bytes
2793 bytes
* Stefan Ram on Tuesday, March 23, 2010: > In slrn, after having tagged articles with »#«, I can save > them with »o«. > > This will save the headers and bodies as they came from the > newsserver. > > The bodies have different »Content-Transfer-Encoding«s (7 bit, > 8 bit, quoted-printable and base64) and different charsets > (ISO-8859-16, ISO-8859-9, BIG5, ISO-8859-14, ISO-8859-4, > ISO-8859-2, GB18030, ISO-8859-13, US-ASCII, ISO-8859-15 and > last not least: UTF-8 AND ISO-8859-1). > > Can I asked slrn to save the bodies »decoded«? That is, > first, decode all 7 bit, quoted-printable and base64 bodies > to an 8 bit representation. Next recode all charsets to > UTF-8 (replacing characters by »?« if they cannot be > represented) or something similar to this? > > (Slrn must already know how to »decode« bodies as it can > show me the bodies decoded.) Are you looking for "decode article", bound to ":" by default? In case your slrn is set up correctly this should already decode to your locale, like, well, slrn does. You haven't told us what your locale is, so it's hard to guess why and what further processing you want/need. c -- theatre - books - texts - movies Black Trash Productions at home: <http://www.blacktrash.org/> Black Trash Productions on Facebook: <http://www.facebook.com/pages/Black-Trash-Productions/277569157339>
Re: [slrn]save recoded bodies
Author: Stefan Ram
Date: Wed, 24 Mar 2010 12:59
Date: Wed, 24 Mar 2010 12:59
40 lines
2822 bytes
2822 bytes
Christian Ebert <blacktrash@gmx.net> writes: >>Can I asked slrn to save the bodies »decoded«? >Are you looking for "decode article", bound to ":" by default? Before I sent my previous post, I tried this »:«. But it did not work as expected. For example, it saved the articles to a file, which now contains: (...) Content-Transfer-Encoding: quoted-printable (... same article ...) und mehr w=FCrde ein anderes Wort auch nicht. Au=DFerdem (...) >In case your slrn is set up correctly this should already decode I have never used slrn until some days ago. When I started it, it told me: Unable to open (....)/.jnewsrc. If you want to create (...)/.jnewsrc, add command line options: -f (...)/.jnewsrc --create So, I used this option. >to your locale, like, well, slrn does. You haven't told us what >your locale is, so it's hard to guess why and what further >processing you want/need. I have a command »locale«, whose output starts with LANG=en_US LANGUAGE=en_US (...) , but does not contain charset-related entries. I want the articles to be decoded to UTF-8, but ISO-8859-1 also would be fine.
Re: [slrn]save recoded bodies
Author: Whiskers
Date: Wed, 24 Mar 2010 15:02
Date: Wed, 24 Mar 2010 15:02
53 lines
3740 bytes
3740 bytes
On 2010-03-23, Stefan Ram <ram@zedat.fu-berlin.de> wrote:
> In slrn, after having tagged articles with »#«, I can save
> them with »o«.
>
> This will save the headers and bodies as they came from the
> newsserver.
>
> The bodies have different »Content-Transfer-Encoding«s (7 bit,
> 8 bit, quoted-printable and base64) and different charsets
> (ISO-8859-16, ISO-8859-9, BIG5, ISO-8859-14, ISO-8859-4,
> ISO-8859-2, GB18030, ISO-8859-13, US-ASCII, ISO-8859-15 and
> last not least: UTF-8 AND ISO-8859-1).
>
> Can I asked slrn to save the bodies »decoded«? That is,
> first, decode all 7 bit, quoted-printable and base64 bodies
> to an 8 bit representation. Next recode all charsets to
> UTF-8 (replacing characters by »?« if they cannot be
> represented) or something similar to this?
>
> (Slrn must already know how to »decode« bodies as it can
> show me the bodies decoded.)
Slrn's built-in 'decode' function is for converting binary files encoded
using base64 or uuencode back into the original form - JPG, GIF, OGG, etc.
A compile-time option is to link slrn to the separate uudeview tool instead
of using the built-in code; that will add the ability to cope with yEnc
posts. The decoded files are saved in the decode directory (or the save
directory) specified in your ~/.slrnrc file.
See the slrn manual 6.12 for the "charsat" settings information that
determines how slrn copes with text messages. Run the command
slrn --version
to see which version of S-Lang your slrn is compiled against; S-Lang
version 2 is required for slrn to be able to handle UTF-8 fully.
I don't think slrn can change the character encoding of a text article when
'saving' it. However, the Linux command recode can do this. I haven't
had occasion to use it myself so I can't give usage advice - and the man
file isn't easy to follow - but you can probably find usage examples on
line. I think using it on usenet articles could corrupt the message
headers.
Slrn's pipe command | might be of interest to you too. I use it to pipe
HTML articles (via metamail) to Lynx. I think it should be possible to
pipe an article to a shell script acting as a 'wrapper' for the recode
command. Someone may already have something of the sort set up.
--
-- ^^^^^^^^^^
-- Whiskers
-- ~~~~~~~~~~
Re: [slrn]save recoded bodies
Author: Christian Ebert
Date: Wed, 24 Mar 2010 22:39
Date: Wed, 24 Mar 2010 22:39
23 lines
2407 bytes
2407 bytes
* Stefan Ram on Wednesday, March 24, 2010: > Christian Ebert <blacktrash@gmx.net> writes: >>> Can I asked slrn to save the bodies »decoded«? >> Are you looking for "decode article", bound to ":" by default? > > Before I sent my previous post, I tried this »:«. But it did > not work as expected. For example, it saved the articles to > a file, which now contains: > > (...) > Content-Transfer-Encoding: quoted-printable > (... same article ...) > und mehr w=FCrde ein anderes Wort auch nicht. Au=DFerdem > (...) Yes. Forget what I said, and listen to Whiskers advice. Sorry. c -- Was heißt hier Dogma, ich bin Underdogma! [ What the hell do you mean dogma, I am underdogma. ] free movies --->>> http://www.blacktrash.org/underdogma/ http://itunes.apple.com/podcast/underdogma-movies/id363423596
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads