kate: do not explicitly set codec from katencodingtest program

if I set both the fallback and the codec to be used for saving I would not
expect Kate to automatically choose other encoding (there is already a
warning that data loss may occur if chosen encoding will not work). the
test is just bogus and there is no option to fallback to encoding that will
be able to save the data if the set encoding cannot encode the data - it is
explicitly chosen

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-30 10:35:21 +03:00
parent c0cb825244
commit 21cebeb8c1

View file

@ -43,7 +43,7 @@ int main (int argc, char *argv[])
// set codec // set codec
buffer.setFallbackTextCodec (QTextCodec::codecForName ("ISO-8859-15")); buffer.setFallbackTextCodec (QTextCodec::codecForName ("ISO-8859-15"));
buffer.setTextCodec (QTextCodec::codecForName (encoding.toLatin1())); // buffer.setTextCodec (QTextCodec::codecForName (encoding.toLatin1()));
// switch to Mac EOL, this will test eol detection, as files are normal unix or dos // switch to Mac EOL, this will test eol detection, as files are normal unix or dos
buffer.setEndOfLineMode (Kate::TextBuffer::eolMac); buffer.setEndOfLineMode (Kate::TextBuffer::eolMac);