Kate::TextLoader
#include <katetextloader.h>
Public Member Functions | |
TextLoader (const QString &filename, KEncodingProber::ProberType proberType) | |
~TextLoader () | |
bool | byteOrderMarkFound () const |
QByteArray | digest () |
bool | eof () const |
TextBuffer::EndOfLineMode | eol () const |
const QString & | mimeTypeForFilterDev () const |
bool | open (QTextCodec *codec) |
bool | readLine (int &offset, int &length) |
QTextCodec * | textCodec () const |
const QChar * | unicode () const |
Detailed Description
File Loader, will handle reading of files + detecting encoding.
Definition at line 30 of file katetextloader.h.
Constructor & Destructor Documentation
◆ TextLoader()
|
inline |
Construct file loader for given file.
- Parameters
-
filename file to open proberType prober type
Definition at line 38 of file katetextloader.h.
◆ ~TextLoader()
|
inline |
Destructor.
Definition at line 69 of file katetextloader.h.
Member Function Documentation
◆ byteOrderMarkFound()
|
inline |
◆ eof()
|
inline |
◆ eol()
|
inline |
Detected end of line mode for this file.
Detected during reading, is valid after complete file is read.
- Returns
- eol mode of this file
Definition at line 122 of file katetextloader.h.
◆ mimeTypeForFilterDev()
|
inline |
mime type used to create filter dev
- Returns
- mime-type of filter device
Definition at line 140 of file katetextloader.h.
◆ open()
|
inline |
open file with given codec
- Parameters
-
codec codec to use, if 0, will do some auto-detect or fallback
- Returns
- success
Definition at line 80 of file katetextloader.h.
◆ readLine()
|
inline |
read a line, return length + offset in Unicode data
- Parameters
-
offset offset into internal Unicode data for read line length length of read line
- Returns
- true if no encoding errors occurred
did we read two time but got no stuff? encoding error fixes problem with one character latin-1 files, which lead to crash otherwise! bug 272579
keep track if we have found BOM so that failedToConvertOnce is not erroneously set to true BUG: 440359
reading loop
if no codec given, do autodetection
byte order said something about encoding?
no Unicode BOM found, trigger prober
first: try to get HTML header encoding
else: use KEncodingProber
Definition at line 169 of file katetextloader.h.
◆ textCodec()
|
inline |
Get codec for this loader.
- Returns
- currently in use codec of this loader
Definition at line 158 of file katetextloader.h.
◆ unicode()
|
inline |
internal Unicode data array
- Returns
- internal Unicode data
Definition at line 149 of file katetextloader.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 03:55:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.