[Bug 510018]
Szo
510018 at bugs.launchpad.net
Thu Mar 28 14:55:26 UTC 2013
Created attachment 78460
Working fix
This attacment is a patch against kde4libs-4.10.1.
It works around the problem like this: in KLocalePrivate::initFileNameEncoding() KDE sets the QFile's encoding/decoding function, to to/fromUTF8() in QString, which in turn calls QUtf8's converter function (QUtf8 is not exported to developers, so I had to use an inefficient method, I think it would be better if we could use the state parameter for error detection). I replaced this with the said functions' copy/pasted version and changed it, so when it encounters an invalid UTF8 string, it will encode it byte by byte, mapping the lower 128 their normal unicode place and the upper 128 to U+18000-U+1807F, and of course the decoder reverses it.
To make this actually work you have to define the KDE_UTF8_FILENAMES enviroment variable (otherwise we would need to patch at QT level).
So, do the following:
.kde/env/KDE_UTF8_FILENAMES.sh
with this content:
export KDE_UTF8_FILENAMES=yesplease
logout, login, try dolphin on faulty files. (instead of the usual boxed
"?" you'll see just boxes)
HTH
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdebase in Ubuntu.
https://bugs.launchpad.net/bugs/510018
Title:
Cannot delete file with bad filename
To manage notifications about this bug go to:
https://bugs.launchpad.net/kde-baseapps/+bug/510018/+subscriptions
More information about the kubuntu-bugs
mailing list