Fixed KateBuffer::canEncode() never returning false
Note that the QStringEncoder::encode() methods in Qt6 don't actually encode anything, but instead return lazy objects which are convertible to QByteArray. The actual encoding happens during this conversion, hence we need to explicitly force the conversion. Otherwise encoding will not happen, encoder.hasError() will never return true, and the canEncode() method will never return false.
For details, see:
Signed-off-by: Jaak Ristioja jaak@ristioja.ee