[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#536664: [shtylman@gmail.com: Fwd: Fwd: Bug#536664: unable to save files into local FS using KDE's dialogs]



Hi Didier,

yes. seems so. (see fwd)

----- Forwarded message from Roman Shtylman <shtylman@gmail.com> -----

Date: Tue, 25 Aug 2009 19:26:22 -0400
Subject: Fwd: Fwd: Bug#536664: unable to save files into local FS using KDE's 
	dialogs
From: Roman Shtylman <shtylman@gmail.com>
To: Rene Engelhard <rene@debian.org>

---------- Forwarded message ----------
From: Rafael Cabral <cabral@mandriva.com>
Date: Tue, Aug 25, 2009 at 4:42 PM
Subject: Re: Fwd: Bug#536664: unable to save files into local FS using
KDE's dialogs
To: Roman Shtylman <shtylman@gmail.com>
Cc: Philipp.Lohmann@sun.com


Hi,

Yes I have.  It's not just a problem with exporting files since all
files saved in such /tmp/accenté loses the last letter in the file name.
The bug is on a conversion function  (QString to OUString) on the
KDEFile picker (KDE4FilePicker.cxx) as follow:

rtl::OUString toOUString(const QString& s)
{
     return rtl::OUString(s.toUtf8().data(), s.length(),
RTL_TEXTENCODING_UTF8);
}

s.length() is the string size in characters whereas we need it that size
in char bytes as toUtf8() QString converts to an QByteArray, so getting
the right size in char bytes fixes the bug as follow:

return rtl::OUString(s.toUtf8().data(), s.toUtf8().length(),
RTL_TEXTENCODING_UTF8);

That has solved the bug for me :).
regards,
Rafael Cabral

> Have you guys been able to see this behavior?
>
> ~Roman
[...]

----- End forwarded message -----

Grüße/Regards,

Rene
-- 
 .''`.  René Engelhard -- Debian GNU/Linux Developer
 : :' : http://www.debian.org | http://people.debian.org/~rene/
 `. `'  rene@debian.org | GnuPG-Key ID: D03E3E70
   `-   Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70



Reply to: