Re: [gedit-list] Fix Bug 342918 and even support universal encoding detection



2012/10/16 Ma Xiaojun <damage3025 gmail com>
https://live.gnome.org/Gedit/RoadMap
One of the item is "Changing encoding of opened files", I'm going to work on it.
Can any previous developer explain is there any known difficult?
Why making encoding of a document read-only?

This is just an implementation detail. You can at the moment only _Save_ a document with a new encoding (at which moment the new encoding will be set in the doc). Note that encodings are _only_ used when loading and saving a document from/to disk. The internal representation of the document is always in UTF-8. I don't think there is anything particularly difficult about allowing to reopen a document with a different encoding.
 

Changing encoding would only be a workaround.
Universal encoding detection is right way to go.
As our friend editor has done this for more than 2 years now.
http://kate-editor.org/2010/08/26/encoding-detection-revised/

We don't have KEncodingProber.

Actually, we have had this kind of "universal encoding detection" for a very long time now, so I don't really see what you mean (see http://git.gnome.org/browse/gedit/tree/gedit/gedit-document-output-stream.c)
 
But I found a library to handle encoding detection stuff.
http://code.google.com/p/uchardet/
Can I use it directly or I need to port a GNOMEism library?

gedit can't link against random libraries, unless it's something properly licenced, released and packaged. In any case, we already do this.
 
_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]