Bug 122129 - feature request: open document->encoding autodetect
Summary: feature request: open document->encoding autodetect
Status: REPORTED
Alias: None
Product: kile
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-16 21:57 UTC by Sergey
Modified: 2023-01-08 20:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2006-02-16 21:57:58 UTC
Version:           1.8.1 (using KDE 3.5.1, Gentoo)
Compiler:          gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)
OS:                Linux (i686) release 2.6.15-gentoo-r1

it will be very useful to automatically determine tex document encoding, as it is written in tex files. For example, while loading file, Kile could grep first 10 lines to find regexp:

\usepackage[cp1251]{inputenc}
cp1251=`sed 's/^\\usepackage[\(.*\)]{inputenc}/\1/'`

Thank you for developing such a powerful tool for document creation!
Comment 1 Thomas Braun 2006-02-17 11:40:19 UTC
Hi,

normally kile should autodetect the file encoding. And because [...]inputenc is the same than the file encoding, grepping for the encoding should not be necessary.
Or do you have a problem with an specific file or encoding?

Thanks 
Thomas Braun
Comment 2 Sergey 2006-02-21 10:39:04 UTC
Kile really does autodetect encoding when file is opened using File-Open dialog, but it doesn't when using Open panel on the left side. It's right, because on the bottom of the panel encoding is specified. Could you add in this list of encodings Autodetect item, please?
Sergey Artyukhin
Comment 3 Tapani 2008-10-23 10:43:12 UTC
Kile does not autodetect document encoding when I open documents, whatever method I use to open the document. The default encoding is selected every time, regardless of the inputenc value. My default encoding is UTF-8, but a document encoded Latin-1 (iso 8859-1) fails to be recognised as such.

I run Kile in Gnome, which I assume is irrelevant.
Comment 4 Thomas Braun 2009-05-26 23:39:38 UTC
Can you try the kde4 version of kile and check if the problem persists.
See http://apps.sourceforge.net/mediawiki/kile/index.php?title=KileForKDE4 for installation hints.
Comment 5 Dominik Haumann 2011-04-06 14:13:53 UTC
The encoding detection should now work much better from KDE SC >= 4.5.
See: http://kate-editor.org/2010/08/26/encoding-detection-revised/
Imo, this report can be closed and reopened, if problems reoccur.
Comment #3 is certainly fixed.