make khtml/misc/decoder.* public

Stephan Kulow coolo at kde.org
Mon Mar 5 09:37:27 GMT 2007


Am Sonntag 04 März 2007 schrieb Cyrille Berger:
> > You may feel that doing so is better than not, because it means that the
> > characters in the file will be correctly rendered. But when you edit and
> > save the file, it means that you may make a change to the file that you
> > do not know of.
>
> I think its worse to have : "I open a file, edit something but don't
> realize yet that the file was opened with the wrong encoding, save, close,
> and reopent the file later, scroll, and then realize that a large part of
> the file is broken". And it has happen quiet often to me. And to me, there
> is nothing worse than data loss.

But still the decoder in khtml is only made for rendering (i.e. readonly). So 
if we want to use this for editors, we need a "safe for saving" flag. If you 
open iso-8859-15 without non-ASCII letters as ASCII, there won't be any harm 
done. But as soon as you skip letters or merge letters or whatever we're 
talking data loss. So the decoder as is should not be used for files that 
will be saved later.

Greetings, Stephan




More information about the kde-core-devel mailing list