Summary: | error message uses wrong encoding | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Olivier Vitrat <ovit.debian> |
Component: | bookmarks | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Screenshot of the error dialog |
Description
Olivier Vitrat
2007-02-28 14:54:28 UTC
This is a Debian BTS report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=362653 If the same bug exists in german and french language, then i doubt that it's a i18n bug. It's more likely a bug in konqueror sourcecode. Olivier: Do you have a screenshot of the bug, so that we can see it "in action" and with a context? Is this error message displayed in a dialog window or is it shown as text in the rendering area of konqueror? How do you change the locale used for konqueror exactly (what's the exact command)? Created attachment 19852 [details]
Screenshot of the error dialog
Hi,
I attached a screnshot of the error dialog.
I selected the locale using
LANG=fr_FR.utf8 konqueror
The problem is simple: Konqueror assumes system error messages are encoded in
latin1 instead of the system locale and tries to convert the message from
latin1 into utf8.
Jens
I cannot see the bug myself, but i had a look at the code and it seems the errormessage just takes the system-message (permission denied) and includes it into the translated message. I guess the responsible .arg() argument in kdelibs/kio/bookmarks/kbookmarkmanager.cc:369 needs a "fromLocal8Bit()" in some way. But my limited programming skills don't suffice to solve this bug. Thus i reassign it back to the konqueror developers. Cheers Thomas forgot to reassign the bug to the konqi devs, sorry for the delay. ok, this patch against KDE 3.5 should fix the bug: Index: bookmarks/kbookmarkmanager.cc =================================================================== --- bookmarks/kbookmarkmanager.cc (Revision 642839) +++ bookmarks/kbookmarkmanager.cc (Arbeitskopie) @@ -366,7 +366,7 @@ "This error message will only be shown once. The cause " "of the error needs to be fixed as quickly as possible, " "which is most likely a full hard drive.") - .arg(filename).arg(strerror(file.status())); + .arg(filename).arg(QString::fromLocal8Bit(strerror(file.status()))); if (qApp->type() != QApplication::Tty) KMessageBox::error( 0L, error ); else SVN commit 642895 by reitelbach: use correct encoding for the errormessage that comes from the OS BUG:142325 M +1 -1 kbookmarkmanager.cc --- branches/KDE/3.5/kdelibs/kio/bookmarks/kbookmarkmanager.cc #642894:642895 @@ -366,7 +366,7 @@ "This error message will only be shown once. The cause " "of the error needs to be fixed as quickly as possible, " "which is most likely a full hard drive.") - .arg(filename).arg(strerror(file.status())); + .arg(filename).arg(QString::fromLocal8Bit(strerror(file.status()))); if (qApp->type() != QApplication::Tty) KMessageBox::error( 0L, error ); else |