Fwd: Re: MIME changes

Andras Mantia amantia at freemail.hu
Tue May 13 23:51:51 EEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 2003 May 13 16:39, David Faure wrote:
[...]
> > > Wouldn't it be better to just check the start of the file for control
> > > characters? Or even just show it anyway? In ROX-Filer, clicking on any
> > > file with Shift held down loads it as if it was a text/plain file, for
> > > example.
> >
> > Nice for binaries :)
> > I don't think it makes sense to always offer to view something as plain
> > text though.
>
> Non-novice users will often want to do just that though. Loading an MS
> Word document into a text editor is a reasonable way to try and read it if
> you don't have a converter, and loading an executable is a good way to
> find paths for 'File missing' errors, or to look for credits or other
> error messages.
But loading of a binary file into a text editor may do very bad things. 
Currently I know that it can crash Kate, and even with another editor part, 
I'm not sure that Quanta would survive opening a binary file as text. Some 
applications are simply not designed to view/edit binary files. There are 
special applications for the above tasks, like the KHexEdit in KDE.
>
> > > We already have 'text/*' to indicate that text is a reasonable want to
> > > view the file (as a default option). Having another layer ("This file
> > > shouldn't normally be viewed as text, but advanced users could still
> > > get some sense out of it") doesn't seem necessary, given that an
> > > advanced user should be able to view *anything* as text, if they want
> > > (eg, an MS-Word document).
> >
> > But viewing binary data as text is much less useful than viewing e.g.
> > python/ruby/perl scripts or postscript files, as text.
>
> I'm having a hard time imagining someone who can usefully view a perl
> script as text, but wouldn't understand why loading an MP3 produced random
> characters. 
I think the problem is not that the user will see some garbage that he/she 
doesn't understand. The problem is that non-text files may harm the 
application behavior. 

> In any case, the text editor should just display a box ("This
> file doesn't appear to be a text file. Really try to view it?").
Sure, but in order to do this, first you must know that the file is not a text 
file.

> > I think the point of X-KDE-text is to offer a sensible "advanced users
> > can view AND edit this as text" option in some apps (which is the case
> > for perl/ruby/python, but editing as text is definitely not a good idea
> > with binary formats). Andras, can you confirm?
>
> But do advanced users (programmers?) need this kind of hand-holding? You
> still have to offer a load-as-text option anyway (even for binary files),
> and you still have to check that something typed as text really is, so I
> don't see this buys you anything:
>
> 	"View as text."
> 	"This isn't a text/* file. Really view it?"
> 	"Yes."
> 	"It isn't marked as X-KDE-text. REALLY view it?"
> 	"Yes."
> 	"It seems to contain binary data. Really REALLY view it?"
> 	"YES!"

As I said above:
- - advanced users can use advanced tools which doesn't really care about the 
file type
- - some applications expect the file to be a text one
- - in order to offer the possibility of choice, you must know the type of the 
file

I think X-KDE-Text or a similar entry (like the one suggested by Stephan) 
should be present inside the mimetype info.

Andras
>
>
> --
> Thomas Leonard			http://rox.sourceforge.net
> tal00r at ecs.soton.ac.uk		tal197 at users.sourceforge.net
> GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
> _______________________________________________
> Xdg-list mailing list
> Xdg-list at freedesktop.org
> https://www.redhat.com/mailman/listinfo/xdg-list
>
>
>
> -------------------------------------------------------

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+wVrrTQdfac6L/08RAtmRAKDICAA8DgpZL+QOjhvT/98juQRcpwCfbMYt
w/IbOlg09u6CRpPTTpKS7G4=
=xrNq
-----END PGP SIGNATURE-----



More information about the xdg mailing list