Trim lines before MIME/UUE/etc. decoding

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Trim lines before MIME/UUE/etc. decoding

Post by *MarcinW »

I'd like to ask for a very simple improvement.

These sample files can be decoded with TC ("Files" -> "Decode File (MIME,UUE,XXE,BinHex)..."):

MIME:

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.txt"

dGVzdA==
UUE:

Code: Select all

begin 644 test.txt
$=&5S=```
`
end
sum -r/size 16597/4

But when some spaces are added before lines, files can't be decoded anymore - for the files below, decoding MIME displays a warning, and decoding UUE doesn't display any warning, but creates a file, which is empty:

MIME (space is added at the beginning of the last line):

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.txt"

 dGVzdA==
UUE (space is added at the beginning of the second line)

Code: Select all

begin 644 test.txt
 $=&5S=```
`
end
sum -r/size 16597/4

The two examples above are artificial, but I sometimes get additional spaces before ALL lines, when using old Opera 12 browser and copying text from a web page. Then, before decoding with TC, I must trim spaces by using some external tool.

So maybe lines could be trimmed before decoding MIME/UUE/etc.?

Regards
Post Reply