[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inline methods without mimencode and Perl
From: |
Daniel Pittman |
Subject: |
Re: Inline methods without mimencode and Perl |
Date: |
Wed, 31 Jul 2002 11:02:35 +1000 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.5 (bamboo, i686-pc-linux) |
On Tue, 30 Jul 2002, Kai Gro wrote:
> After some thinking it seems that inline methods can be made to work
> even for strange remote systems which don't have a way for doing
> base64 or uu encoding.
>
> The idea is this: for reading a file from such a system, we use "od
> -b". This is documented to work even on Unix Version 7, so I'm
> pretty sure it will work everywhere.
[...]
> So, what do you folks think? Is anyone there who would like to do
> this? It's not quite clear to me where in the current architecture
> does all this detection fit in. Clearly, if mimencode works, then we
> don't want to invest all the work in figuring out how to suppress the
> trailing newline...
*nod* I would suggest maintaining a list of possible encodings, or
rather functions that detect if an encoding works, in preference order.
Then you walk through that list, pull the first detection function from
it and test it. If it works, use it, otherwise go on to the next and so
forth.
If you make that infrastructure generic you can then use it for the 'how
do we write' test in the 'really old' method you describe. :)
Daniel
--
C makes it easy to shoot yourself in the foot.
C++ makes it harder, but when you do, it blows away your whole leg.
-- Bjarne Stroustrup