[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore
From: David Faure <faure () kde ! org>
Date: 2009-01-05 13:17:03
Message-ID: 1231161423.753228.22044.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 906059 by dfaure:
Fix short/ushort error which broke prettyUrl for e.g. chinese unicode characters.
M +1 -1 io/kurl.cpp
M +4 -0 tests/kurltest.cpp
--- trunk/KDE/kdelibs/kdecore/io/kurl.cpp #906058:906059
@@ -998,7 +998,7 @@
QString result;
for (int i = 0; i < input.length(); ++i) {
QChar c = input.at(i);
- register short u = c.unicode();
+ register ushort u = c.unicode();
if (u < 0x20 || u == '?' || u == '#' || u == '%'
|| (u == ' ' && (i+1 == input.length() || input.at(i+1) == ' '))) {
static const char hexdigits[] = "0123456789ABCDEF";
--- trunk/KDE/kdelibs/kdecore/tests/kurltest.cpp #906058:906059
@@ -1571,6 +1571,10 @@
KUrl urlWithUnicodeChar( QString::fromUtf8("file:///home/dfaure/Matériel") );
QCOMPARE( uloc.url(), QString("file:///home/dfaure/Mat%C3%A9riel") );
+
+ KUrl wkai(QString::fromUtf8("/tmp/魔"));
+ QCOMPARE(wkai.url(), QString("file:///tmp/%E9%AD%94"));
+ QCOMPARE(wkai.prettyUrl(), QString::fromUtf8("file:///tmp/魔"));
}
void KUrlTest::testOtherEncodings()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic