[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request 110043: Proposed fix/workaround for legacy encoded filename handling
From: "Oswald Buddenhagen" <ossi () kde ! org>
Date: 2013-05-05 8:57:22
Message-ID: 20130505085722.2671.57376 () vidsolbach ! de
[Download RAW message or body]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110043/#review32055
-----------------------------------------------------------
this is kinda getting old ...
just two links to discussions i was involved in:
http://www.mail-archive.com/development@qt-project.org/msg04255.html
http://comments.gmane.org/gmane.comp.kde.devel.core/54679
- Oswald Buddenhagen
On May 5, 2013, 8:13 a.m., Róbert Szókovács wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110043/
> -----------------------------------------------------------
>
> (Updated May 5, 2013, 8:13 a.m.)
>
>
> Review request for kdelibs and Thiago Macieira.
>
>
> Description
> -------
>
> This patch works around the problem of filenames that are not valid UTF8 strings: \
> 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 to a specific value \
> ("broken_names").
> To test it, do the following: .kde/env/KDE_UTF8_FILENAMES.sh with this content:
> export KDE_UTF8_FILENAMES=broken_names
> logout, login, try dolphin on faulty files. (instead of the usual boxed "?" you'll \
> see just boxes)
>
> This addresses bug 165044.
> http://bugs.kde.org/show_bug.cgi?id=165044
>
>
> Diffs
> -----
>
> kdecore/localization/klocale_kde.cpp b010e74
>
> Diff: http://git.reviewboard.kde.org/r/110043/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Róbert Szókovács
>
>
[Attachment #3 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/110043/">http://git.reviewboard.kde.org/r/110043/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this is kinda getting \
old ... just two links to discussions i was involved in:
http://www.mail-archive.com/development@qt-project.org/msg04255.html
http://comments.gmane.org/gmane.comp.kde.devel.core/54679
</pre>
<br />
<p>- Oswald</p>
<br />
<p>On May 5th, 2013, 8:13 a.m. UTC, Róbert Szókovács wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kdelibs and Thiago Macieira.</div>
<div>By Róbert Szókovács.</div>
<p style="color: grey;"><i>Updated May 5, 2013, 8:13 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch works around the problem of filenames that are not valid UTF8 \
strings: 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 to a specific \
value ("broken_names").
To test it, do the following: .kde/env/KDE_UTF8_FILENAMES.sh with this content:
export KDE_UTF8_FILENAMES=broken_names
logout, login, try dolphin on faulty files. (instead of the usual boxed "?" \
you'll see just boxes)</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=165044">165044</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kdecore/localization/klocale_kde.cpp <span style="color: \
grey">(b010e74)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110043/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic