author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Thu, 08 Apr 2010 14:19:33 +0300 | |
branch | RCL_3 |
changeset 7 | 3f74d0d4af4c |
parent 5 | d3bac044e0f0 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtCore module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
/*! |
|
43 |
\class QUrl |
|
44 |
||
45 |
\brief The QUrl class provides a convenient interface for working |
|
46 |
with URLs. |
|
47 |
||
48 |
\reentrant |
|
49 |
\ingroup io |
|
50 |
\ingroup network |
|
51 |
\ingroup shared |
|
52 |
||
53 |
||
54 |
It can parse and construct URLs in both encoded and unencoded |
|
55 |
form. QUrl also has support for internationalized domain names |
|
56 |
(IDNs). |
|
57 |
||
58 |
The most common way to use QUrl is to initialize it via the |
|
59 |
constructor by passing a QString. Otherwise, setUrl() and |
|
60 |
setEncodedUrl() can also be used. |
|
61 |
||
62 |
URLs can be represented in two forms: encoded or unencoded. The |
|
63 |
unencoded representation is suitable for showing to users, but |
|
64 |
the encoded representation is typically what you would send to |
|
65 |
a web server. For example, the unencoded URL |
|
66 |
"http://b\uuml\c{}hler.example.com" would be sent to the server as |
|
67 |
"http://xn--bhler-kva.example.com/List%20of%20applicants.xml". |
|
68 |
||
69 |
A URL can also be constructed piece by piece by calling |
|
70 |
setScheme(), setUserName(), setPassword(), setHost(), setPort(), |
|
71 |
setPath(), setEncodedQuery() and setFragment(). Some convenience |
|
72 |
functions are also available: setAuthority() sets the user name, |
|
73 |
password, host and port. setUserInfo() sets the user name and |
|
74 |
password at once. |
|
75 |
||
76 |
Call isValid() to check if the URL is valid. This can be done at |
|
77 |
any point during the constructing of a URL. |
|
78 |
||
79 |
Constructing a query is particularly convenient through the use |
|
80 |
of setQueryItems(), addQueryItem() and removeQueryItem(). Use |
|
81 |
setQueryDelimiters() to customize the delimiters used for |
|
82 |
generating the query string. |
|
83 |
||
84 |
For the convenience of generating encoded URL strings or query |
|
85 |
strings, there are two static functions called |
|
86 |
fromPercentEncoding() and toPercentEncoding() which deal with |
|
87 |
percent encoding and decoding of QStrings. |
|
88 |
||
89 |
Calling isRelative() will tell whether or not the URL is |
|
90 |
relative. A relative URL can be resolved by passing it as argument |
|
91 |
to resolved(), which returns an absolute URL. isParentOf() is used |
|
92 |
for determining whether one URL is a parent of another. |
|
93 |
||
94 |
fromLocalFile() constructs a QUrl by parsing a local |
|
95 |
file path. toLocalFile() converts a URL to a local file path. |
|
96 |
||
97 |
The human readable representation of the URL is fetched with |
|
98 |
toString(). This representation is appropriate for displaying a |
|
99 |
URL to a user in unencoded form. The encoded form however, as |
|
100 |
returned by toEncoded(), is for internal use, passing to web |
|
101 |
servers, mail clients and so on. |
|
102 |
||
103 |
QUrl conforms to the URI specification from |
|
104 |
\l{RFC 3986} (Uniform Resource Identifier: Generic Syntax), and includes |
|
105 |
scheme extensions from \l{RFC 1738} (Uniform Resource Locators). Case |
|
106 |
folding rules in QUrl conform to \l{RFC 3491} (Nameprep: A Stringprep |
|
107 |
Profile for Internationalized Domain Names (IDN)). |
|
108 |
||
109 |
\sa QUrlInfo |
|
110 |
*/ |
|
111 |
||
112 |
/*! |
|
113 |
\enum QUrl::ParsingMode |
|
114 |
||
115 |
The parsing mode controls the way QUrl parses strings. |
|
116 |
||
117 |
\value TolerantMode QUrl will try to correct some common errors in URLs. |
|
118 |
This mode is useful when processing URLs entered by |
|
119 |
users. |
|
120 |
||
121 |
\value StrictMode Only valid URLs are accepted. This mode is useful for |
|
122 |
general URL validation. |
|
123 |
||
124 |
In TolerantMode, the parser corrects the following invalid input: |
|
125 |
||
126 |
\list |
|
127 |
||
128 |
\o Spaces and "%20": If an encoded URL contains a space, this will be |
|
129 |
replaced with "%20". If a decoded URL contains "%20", this will be |
|
130 |
replaced with a single space before the URL is parsed. |
|
131 |
||
132 |
\o Single "%" characters: Any occurrences of a percent character "%" not |
|
133 |
followed by exactly two hexadecimal characters (e.g., "13% coverage.html") |
|
134 |
will be replaced by "%25". |
|
135 |
||
136 |
\o Reserved and unreserved characters: An encoded URL should only |
|
137 |
contain a few characters as literals; all other characters should |
|
138 |
be percent-encoded. In TolerantMode, these characters will be |
|
139 |
automatically percent-encoded where they are not allowed: |
|
140 |
space / double-quote / "<" / ">" / "[" / "\" / |
|
141 |
"]" / "^" / "`" / "{" / "|" / "}" |
|
142 |
||
143 |
\endlist |
|
144 |
*/ |
|
145 |
||
146 |
/*! |
|
147 |
\enum QUrl::FormattingOption |
|
148 |
||
149 |
The formatting options define how the URL is formatted when written out |
|
150 |
as text. |
|
151 |
||
152 |
\value None The format of the URL is unchanged. |
|
153 |
\value RemoveScheme The scheme is removed from the URL. |
|
154 |
\value RemovePassword Any password in the URL is removed. |
|
155 |
\value RemoveUserInfo Any user information in the URL is removed. |
|
156 |
\value RemovePort Any specified port is removed from the URL. |
|
157 |
\value RemoveAuthority |
|
158 |
\value RemovePath The URL's path is removed, leaving only the scheme, |
|
159 |
host address, and port (if present). |
|
160 |
\value RemoveQuery The query part of the URL (following a '?' character) |
|
161 |
is removed. |
|
162 |
\value RemoveFragment |
|
163 |
\value StripTrailingSlash The trailing slash is removed if one is present. |
|
164 |
||
165 |
Note that the case folding rules in \l{RFC 3491}{Nameprep}, which QUrl |
|
166 |
conforms to, require host names to always be converted to lower case, |
|
167 |
regardless of the Qt::FormattingOptions used. |
|
168 |
*/ |
|
169 |
||
170 |
#include "qplatformdefs.h" |
|
171 |
#include "qurl.h" |
|
172 |
#include "private/qunicodetables_p.h" |
|
173 |
#include "qatomic.h" |
|
174 |
#include "qbytearray.h" |
|
175 |
#include "qdir.h" |
|
176 |
#include "qfile.h" |
|
177 |
#include "qlist.h" |
|
178 |
#ifndef QT_NO_REGEXP |
|
179 |
#include "qregexp.h" |
|
180 |
#endif |
|
181 |
#include "qstring.h" |
|
182 |
#include "qstringlist.h" |
|
183 |
#include "qstack.h" |
|
184 |
#include "qvarlengtharray.h" |
|
185 |
#include "qdebug.h" |
|
186 |
#if defined QT3_SUPPORT |
|
187 |
#include "qfileinfo.h" |
|
188 |
#endif |
|
189 |
||
190 |
#if defined(Q_OS_WINCE_WM) |
|
191 |
#pragma optimize("g", off) |
|
192 |
#endif |
|
193 |
||
194 |
QT_BEGIN_NAMESPACE |
|
195 |
||
196 |
extern void q_normalizePercentEncoding(QByteArray *ba, const char *exclude); |
|
197 |
extern void q_toPercentEncoding(QByteArray *ba, const char *exclude, const char *include = 0); |
|
198 |
extern void q_fromPercentEncoding(QByteArray *ba); |
|
199 |
||
200 |
static QByteArray toPercentEncodingHelper(const QString &s, const char *exclude, const char *include = 0) |
|
201 |
{ |
|
202 |
if (s.isNull()) |
|
203 |
return QByteArray(); // null |
|
204 |
QByteArray ba = s.toUtf8(); |
|
205 |
q_toPercentEncoding(&ba, exclude, include); |
|
206 |
return ba; |
|
207 |
} |
|
208 |
||
209 |
static QString fromPercentEncodingHelper(const QByteArray &ba) |
|
210 |
{ |
|
211 |
if (ba.isNull()) |
|
212 |
return QString(); // null |
|
213 |
QByteArray copy = ba; |
|
214 |
q_fromPercentEncoding(©); |
|
215 |
return QString::fromUtf8(copy.constData(), copy.length()); |
|
216 |
} |
|
217 |
||
218 |
static QString fromPercentEncodingMutable(QByteArray *ba) |
|
219 |
{ |
|
220 |
if (ba->isNull()) |
|
221 |
return QString(); // null |
|
222 |
q_fromPercentEncoding(ba); |
|
223 |
return QString::fromUtf8(ba->constData(), ba->length()); |
|
224 |
} |
|
225 |
||
226 |
// ### Qt 5: Consider accepting empty strings as valid. See task 144227. |
|
227 |
||
228 |
//#define QURL_DEBUG |
|
229 |
||
230 |
// implemented in qvsnprintf.cpp |
|
231 |
Q_CORE_EXPORT int qsnprintf(char *str, size_t n, const char *fmt, ...); |
|
232 |
||
233 |
// needed by the punycode encoder/decoder |
|
234 |
#define Q_MAXINT ((uint)((uint)(-1)>>1)) |
|
235 |
static const uint base = 36; |
|
236 |
static const uint tmin = 1; |
|
237 |
static const uint tmax = 26; |
|
238 |
static const uint skew = 38; |
|
239 |
static const uint damp = 700; |
|
240 |
static const uint initial_bias = 72; |
|
241 |
static const uint initial_n = 128; |
|
242 |
||
243 |
#define QURL_SETFLAG(a, b) { (a) |= (b); } |
|
244 |
#define QURL_UNSETFLAG(a, b) { (a) &= ~(b); } |
|
245 |
#define QURL_HASFLAG(a, b) (((a) & (b)) == (b)) |
|
246 |
||
247 |
struct QUrlErrorInfo { |
|
248 |
inline QUrlErrorInfo() : _source(0), _message(0), _expected(0), _found(0) |
|
249 |
{ } |
|
250 |
||
251 |
const char *_source; |
|
252 |
const char *_message; |
|
253 |
char _expected; |
|
254 |
char _found; |
|
255 |
||
256 |
inline void setParams(const char *source, const char *message, char expected, char found) |
|
257 |
{ |
|
258 |
_source = source; |
|
259 |
_message = message; |
|
260 |
_expected = expected; |
|
261 |
_found = found; |
|
262 |
} |
|
263 |
}; |
|
264 |
||
265 |
struct QUrlParseData |
|
266 |
{ |
|
267 |
const char *scheme; |
|
268 |
int schemeLength; |
|
269 |
||
270 |
const char *userInfo; |
|
271 |
int userInfoDelimIndex; |
|
272 |
int userInfoLength; |
|
273 |
||
274 |
const char *host; |
|
275 |
int hostLength; |
|
276 |
int port; |
|
277 |
||
278 |
const char *path; |
|
279 |
int pathLength; |
|
280 |
const char *query; |
|
281 |
int queryLength; |
|
282 |
const char *fragment; |
|
283 |
int fragmentLength; |
|
284 |
}; |
|
285 |
||
286 |
||
287 |
class QUrlPrivate |
|
288 |
{ |
|
289 |
public: |
|
290 |
QUrlPrivate(); |
|
291 |
QUrlPrivate(const QUrlPrivate &other); |
|
292 |
||
293 |
bool setUrl(const QString &url); |
|
294 |
||
295 |
QString canonicalHost() const; |
|
296 |
void ensureEncodedParts() const; |
|
297 |
QString authority(QUrl::FormattingOptions options = QUrl::None) const; |
|
298 |
void setAuthority(const QString &auth); |
|
299 |
void setUserInfo(const QString &userInfo); |
|
300 |
QString userInfo(QUrl::FormattingOptions options = QUrl::None) const; |
|
301 |
void setEncodedAuthority(const QByteArray &authority); |
|
302 |
void setEncodedUserInfo(const QUrlParseData *parseData); |
|
303 |
||
304 |
QByteArray mergePaths(const QByteArray &relativePath) const; |
|
305 |
||
306 |
void queryItem(int pos, int *value, int *end); |
|
307 |
||
308 |
enum ParseOptions { |
|
309 |
ParseAndSet, |
|
310 |
ParseOnly |
|
311 |
}; |
|
312 |
||
313 |
void validate() const; |
|
314 |
void parse(ParseOptions parseOptions = ParseAndSet) const; |
|
315 |
void clear(); |
|
316 |
||
317 |
QByteArray toEncoded(QUrl::FormattingOptions options = QUrl::None) const; |
|
318 |
||
319 |
QAtomicInt ref; |
|
320 |
||
321 |
QString scheme; |
|
322 |
QString userName; |
|
323 |
QString password; |
|
324 |
QString host; |
|
325 |
QString path; |
|
326 |
QByteArray query; |
|
327 |
QString fragment; |
|
328 |
||
329 |
QByteArray encodedOriginal; |
|
330 |
QByteArray encodedUserName; |
|
331 |
QByteArray encodedPassword; |
|
332 |
QByteArray encodedPath; |
|
333 |
QByteArray encodedFragment; |
|
334 |
||
335 |
int port; |
|
336 |
QUrl::ParsingMode parsingMode; |
|
337 |
||
338 |
bool hasQuery; |
|
339 |
bool hasFragment; |
|
340 |
bool isValid; |
|
341 |
||
342 |
char valueDelimiter; |
|
343 |
char pairDelimiter; |
|
344 |
||
345 |
enum State { |
|
346 |
Parsed = 0x1, |
|
347 |
Validated = 0x2, |
|
348 |
Normalized = 0x4, |
|
349 |
HostCanonicalized = 0x8 |
|
350 |
}; |
|
351 |
int stateFlags; |
|
352 |
||
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
353 |
mutable QByteArray encodedNormalized; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
354 |
const QByteArray & normalized() const; |
0 | 355 |
|
356 |
mutable QUrlErrorInfo errorInfo; |
|
357 |
QString createErrorString(); |
|
358 |
}; |
|
359 |
||
360 |
||
361 |
static bool QT_FASTCALL _HEXDIG(const char **ptr) |
|
362 |
{ |
|
363 |
char ch = **ptr; |
|
364 |
if ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F')) { |
|
365 |
++(*ptr); |
|
366 |
return true; |
|
367 |
} |
|
368 |
||
369 |
return false; |
|
370 |
} |
|
371 |
||
372 |
// pct-encoded = "%" HEXDIG HEXDIG |
|
373 |
static bool QT_FASTCALL _pctEncoded(const char **ptr) |
|
374 |
{ |
|
375 |
const char *ptrBackup = *ptr; |
|
376 |
||
377 |
if (**ptr != '%') |
|
378 |
return false; |
|
379 |
++(*ptr); |
|
380 |
||
381 |
if (!_HEXDIG(ptr)) { |
|
382 |
*ptr = ptrBackup; |
|
383 |
return false; |
|
384 |
} |
|
385 |
if (!_HEXDIG(ptr)) { |
|
386 |
*ptr = ptrBackup; |
|
387 |
return false; |
|
388 |
} |
|
389 |
||
390 |
return true; |
|
391 |
} |
|
392 |
||
393 |
#if 0 |
|
394 |
// gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" |
|
395 |
static bool QT_FASTCALL _genDelims(const char **ptr, char *c) |
|
396 |
{ |
|
397 |
char ch = **ptr; |
|
398 |
switch (ch) { |
|
399 |
case ':': case '/': case '?': case '#': |
|
400 |
case '[': case ']': case '@': |
|
401 |
*c = ch; |
|
402 |
++(*ptr); |
|
403 |
return true; |
|
404 |
default: |
|
405 |
return false; |
|
406 |
} |
|
407 |
} |
|
408 |
#endif |
|
409 |
||
410 |
// sub-delims = "!" / "$" / "&" / "'" / "(" / ")" |
|
411 |
// / "*" / "+" / "," / ";" / "=" |
|
412 |
static bool QT_FASTCALL _subDelims(const char **ptr) |
|
413 |
{ |
|
414 |
char ch = **ptr; |
|
415 |
switch (ch) { |
|
416 |
case '!': case '$': case '&': case '\'': |
|
417 |
case '(': case ')': case '*': case '+': |
|
418 |
case ',': case ';': case '=': |
|
419 |
++(*ptr); |
|
420 |
return true; |
|
421 |
default: |
|
422 |
return false; |
|
423 |
} |
|
424 |
} |
|
425 |
||
426 |
// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" |
|
427 |
static bool QT_FASTCALL _unreserved(const char **ptr) |
|
428 |
{ |
|
429 |
char ch = **ptr; |
|
430 |
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') |
|
431 |
|| (ch >= '0' && ch <= '9') |
|
432 |
|| ch == '-' || ch == '.' || ch == '_' || ch == '~') { |
|
433 |
++(*ptr); |
|
434 |
return true; |
|
435 |
} |
|
436 |
return false; |
|
437 |
} |
|
438 |
||
439 |
// scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
440 |
static bool QT_FASTCALL _scheme(const char **ptr, QUrlParseData *parseData) |
0 | 441 |
{ |
442 |
bool first = true; |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
443 |
bool isSchemeValid = true; |
0 | 444 |
|
445 |
parseData->scheme = *ptr; |
|
446 |
for (;;) { |
|
447 |
char ch = **ptr; |
|
448 |
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { |
|
449 |
; |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
450 |
} else if ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.') { |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
451 |
if (first) |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
452 |
isSchemeValid = false; |
0 | 453 |
} else { |
454 |
break; |
|
455 |
} |
|
456 |
||
457 |
++(*ptr); |
|
458 |
first = false; |
|
459 |
} |
|
460 |
||
461 |
if (**ptr != ':') { |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
462 |
isSchemeValid = true; |
0 | 463 |
*ptr = parseData->scheme; |
464 |
} else { |
|
465 |
parseData->schemeLength = *ptr - parseData->scheme; |
|
466 |
++(*ptr); // skip ':' |
|
467 |
} |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
468 |
|
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
469 |
return isSchemeValid; |
0 | 470 |
} |
471 |
||
472 |
// IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) |
|
473 |
static bool QT_FASTCALL _IPvFuture(const char **ptr) |
|
474 |
{ |
|
475 |
if (**ptr != 'v') |
|
476 |
return false; |
|
477 |
||
478 |
const char *ptrBackup = *ptr; |
|
479 |
++(*ptr); |
|
480 |
||
481 |
if (!_HEXDIG(ptr)) { |
|
482 |
*ptr = ptrBackup; |
|
483 |
return false; |
|
484 |
} |
|
485 |
||
486 |
while (_HEXDIG(ptr)) |
|
487 |
; |
|
488 |
||
489 |
if (**ptr != '.') { |
|
490 |
*ptr = ptrBackup; |
|
491 |
return false; |
|
492 |
} |
|
493 |
++(*ptr); |
|
494 |
||
495 |
if (!_unreserved(ptr) && !_subDelims(ptr) && *((*ptr)++) != ':') { |
|
496 |
*ptr = ptrBackup; |
|
497 |
return false; |
|
498 |
} |
|
499 |
||
500 |
||
501 |
while (_unreserved(ptr) || _subDelims(ptr) || *((*ptr)++) == ':') |
|
502 |
; |
|
503 |
||
504 |
return true; |
|
505 |
} |
|
506 |
||
507 |
// h16 = 1*4HEXDIG |
|
508 |
// ; 16 bits of address represented in hexadecimal |
|
509 |
static bool QT_FASTCALL _h16(const char **ptr) |
|
510 |
{ |
|
511 |
int i = 0; |
|
512 |
for (; i < 4; ++i) { |
|
513 |
if (!_HEXDIG(ptr)) |
|
514 |
break; |
|
515 |
} |
|
516 |
return (i != 0); |
|
517 |
} |
|
518 |
||
519 |
// dec-octet = DIGIT ; 0-9 |
|
520 |
// / %x31-39 DIGIT ; 10-99 |
|
521 |
// / "1" 2DIGIT ; 100-199 |
|
522 |
// / "2" %x30-34 DIGIT ; 200-249 |
|
523 |
// / "25" %x30-35 ; 250-255 |
|
524 |
static bool QT_FASTCALL _decOctet(const char **ptr) |
|
525 |
{ |
|
526 |
const char *ptrBackup = *ptr; |
|
527 |
char c1 = **ptr; |
|
528 |
||
529 |
if (c1 < '0' || c1 > '9') |
|
530 |
return false; |
|
531 |
||
532 |
++(*ptr); |
|
533 |
||
534 |
if (c1 == '0') |
|
535 |
return true; |
|
536 |
||
537 |
char c2 = **ptr; |
|
538 |
||
539 |
if (c2 < '0' || c2 > '9') |
|
540 |
return true; |
|
541 |
||
542 |
++(*ptr); |
|
543 |
||
544 |
char c3 = **ptr; |
|
545 |
if (c3 < '0' || c3 > '9') |
|
546 |
return true; |
|
547 |
||
548 |
// If there is a three digit number larger than 255, reject the |
|
549 |
// whole token. |
|
550 |
if (c1 >= '2' && c2 >= '5' && c3 > '5') { |
|
551 |
*ptr = ptrBackup; |
|
552 |
return false; |
|
553 |
} |
|
554 |
||
555 |
++(*ptr); |
|
556 |
||
557 |
return true; |
|
558 |
} |
|
559 |
||
560 |
// IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet |
|
561 |
static bool QT_FASTCALL _IPv4Address(const char **ptr) |
|
562 |
{ |
|
563 |
const char *ptrBackup = *ptr; |
|
564 |
||
565 |
if (!_decOctet(ptr)) { |
|
566 |
*ptr = ptrBackup; |
|
567 |
return false; |
|
568 |
} |
|
569 |
||
570 |
for (int i = 0; i < 3; ++i) { |
|
571 |
char ch = *((*ptr)++); |
|
572 |
if (ch != '.') { |
|
573 |
*ptr = ptrBackup; |
|
574 |
return false; |
|
575 |
} |
|
576 |
||
577 |
if (!_decOctet(ptr)) { |
|
578 |
*ptr = ptrBackup; |
|
579 |
return false; |
|
580 |
} |
|
581 |
} |
|
582 |
||
583 |
return true; |
|
584 |
} |
|
585 |
||
586 |
// ls32 = ( h16 ":" h16 ) / IPv4address |
|
587 |
// ; least-significant 32 bits of address |
|
588 |
static bool QT_FASTCALL _ls32(const char **ptr) |
|
589 |
{ |
|
590 |
const char *ptrBackup = *ptr; |
|
591 |
if (_h16(ptr) && *((*ptr)++) == ':' && _h16(ptr)) |
|
592 |
return true; |
|
593 |
||
594 |
*ptr = ptrBackup; |
|
595 |
return _IPv4Address(ptr); |
|
596 |
} |
|
597 |
||
598 |
// IPv6address = 6( h16 ":" ) ls32 // case 1 |
|
599 |
// / "::" 5( h16 ":" ) ls32 // case 2 |
|
600 |
// / [ h16 ] "::" 4( h16 ":" ) ls32 // case 3 |
|
601 |
// / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 // case 4 |
|
602 |
// / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 // case 5 |
|
603 |
// / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 // case 6 |
|
604 |
// / [ *4( h16 ":" ) h16 ] "::" ls32 // case 7 |
|
605 |
// / [ *5( h16 ":" ) h16 ] "::" h16 // case 8 |
|
606 |
// / [ *6( h16 ":" ) h16 ] "::" // case 9 |
|
607 |
static bool QT_FASTCALL _IPv6Address(const char **ptr) |
|
608 |
{ |
|
609 |
const char *ptrBackup = *ptr; |
|
610 |
||
611 |
// count of (h16 ":") to the left of and including :: |
|
612 |
int leftHexColons = 0; |
|
613 |
// count of (h16 ":") to the right of :: |
|
614 |
int rightHexColons = 0; |
|
615 |
||
616 |
// first count the number of (h16 ":") on the left of :: |
|
617 |
while (_h16(ptr)) { |
|
618 |
||
619 |
// an h16 not followed by a colon is considered an |
|
620 |
// error. |
|
621 |
if (**ptr != ':') { |
|
622 |
*ptr = ptrBackup; |
|
623 |
return false; |
|
624 |
} |
|
625 |
++(*ptr); |
|
626 |
++leftHexColons; |
|
627 |
||
628 |
// check for case 1, the only time when there can be no :: |
|
629 |
if (leftHexColons == 6 && _ls32(ptr)) { |
|
630 |
return true; |
|
631 |
} |
|
632 |
} |
|
633 |
||
634 |
// check for case 2 where the address starts with a : |
|
635 |
if (leftHexColons == 0 && *((*ptr)++) != ':') { |
|
636 |
*ptr = ptrBackup; |
|
637 |
return false; |
|
638 |
} |
|
639 |
||
640 |
// check for the second colon in :: |
|
641 |
if (*((*ptr)++) != ':') { |
|
642 |
*ptr = ptrBackup; |
|
643 |
return false; |
|
644 |
} |
|
645 |
||
646 |
int canBeCase = -1; |
|
647 |
bool ls32WasRead = false; |
|
648 |
||
649 |
const char *tmpBackup = *ptr; |
|
650 |
||
651 |
// count the number of (h16 ":") on the right of :: |
|
652 |
for (;;) { |
|
653 |
tmpBackup = *ptr; |
|
654 |
if (!_h16(ptr)) { |
|
655 |
if (!_ls32(ptr)) { |
|
656 |
if (rightHexColons != 0) { |
|
657 |
*ptr = ptrBackup; |
|
658 |
return false; |
|
659 |
} |
|
660 |
||
661 |
// the address ended with :: (case 9) |
|
662 |
// only valid if 1 <= leftHexColons <= 7 |
|
663 |
canBeCase = 9; |
|
664 |
} else { |
|
665 |
ls32WasRead = true; |
|
666 |
} |
|
667 |
break; |
|
668 |
} |
|
669 |
++rightHexColons; |
|
670 |
if (**ptr != ':') { |
|
671 |
// no colon could mean that what was read as an h16 |
|
672 |
// was in fact the first part of an ls32. we backtrack |
|
673 |
// and retry. |
|
674 |
const char *pb = *ptr; |
|
675 |
*ptr = tmpBackup; |
|
676 |
if (_ls32(ptr)) { |
|
677 |
ls32WasRead = true; |
|
678 |
--rightHexColons; |
|
679 |
} else { |
|
680 |
*ptr = pb; |
|
681 |
// address ends with only 1 h16 after :: (case 8) |
|
682 |
if (rightHexColons == 1) |
|
683 |
canBeCase = 8; |
|
684 |
} |
|
685 |
break; |
|
686 |
} |
|
687 |
++(*ptr); |
|
688 |
} |
|
689 |
||
690 |
// determine which case it is based on the number of rightHexColons |
|
691 |
if (canBeCase == -1) { |
|
692 |
||
693 |
// check if a ls32 was read. If it wasn't and rightHexColons >= 2 then the |
|
694 |
// last 2 HexColons are in fact a ls32 |
|
695 |
if (!ls32WasRead && rightHexColons >= 2) |
|
696 |
rightHexColons -= 2; |
|
697 |
||
698 |
canBeCase = 7 - rightHexColons; |
|
699 |
} |
|
700 |
||
701 |
// based on the case we need to check that the number of leftHexColons is valid |
|
702 |
if (leftHexColons > (canBeCase - 2)) { |
|
703 |
*ptr = ptrBackup; |
|
704 |
return false; |
|
705 |
} |
|
706 |
||
707 |
return true; |
|
708 |
} |
|
709 |
||
710 |
// IP-literal = "[" ( IPv6address / IPvFuture ) "]" |
|
711 |
static bool QT_FASTCALL _IPLiteral(const char **ptr) |
|
712 |
{ |
|
713 |
const char *ptrBackup = *ptr; |
|
714 |
if (**ptr != '[') |
|
715 |
return false; |
|
716 |
++(*ptr); |
|
717 |
||
718 |
if (!_IPv6Address(ptr) && !_IPvFuture(ptr)) { |
|
719 |
*ptr = ptrBackup; |
|
720 |
return false; |
|
721 |
} |
|
722 |
||
723 |
if (**ptr != ']') { |
|
724 |
*ptr = ptrBackup; |
|
725 |
return false; |
|
726 |
} |
|
727 |
++(*ptr); |
|
728 |
||
729 |
return true; |
|
730 |
} |
|
731 |
||
732 |
// reg-name = *( unreserved / pct-encoded / sub-delims ) |
|
733 |
static void QT_FASTCALL _regName(const char **ptr) |
|
734 |
{ |
|
735 |
for (;;) { |
|
736 |
if (!_unreserved(ptr) && !_subDelims(ptr)) { |
|
737 |
if (!_pctEncoded(ptr)) |
|
738 |
break; |
|
739 |
} |
|
740 |
} |
|
741 |
} |
|
742 |
||
743 |
// host = IP-literal / IPv4address / reg-name |
|
744 |
static void QT_FASTCALL _host(const char **ptr, QUrlParseData *parseData) |
|
745 |
{ |
|
746 |
parseData->host = *ptr; |
|
747 |
if (!_IPLiteral(ptr)) { |
|
748 |
if (_IPv4Address(ptr)) { |
|
749 |
char ch = **ptr; |
|
750 |
if (ch && ch != ':' && ch != '/') { |
|
751 |
// reset |
|
752 |
*ptr = parseData->host; |
|
753 |
_regName(ptr); |
|
754 |
} |
|
755 |
} else { |
|
756 |
_regName(ptr); |
|
757 |
} |
|
758 |
} |
|
759 |
parseData->hostLength = *ptr - parseData->host; |
|
760 |
} |
|
761 |
||
762 |
// userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) |
|
763 |
static void QT_FASTCALL _userInfo(const char **ptr, QUrlParseData *parseData) |
|
764 |
{ |
|
765 |
parseData->userInfo = *ptr; |
|
766 |
for (;;) { |
|
767 |
if (_unreserved(ptr) || _subDelims(ptr)) { |
|
768 |
; |
|
769 |
} else { |
|
770 |
if (_pctEncoded(ptr)) { |
|
771 |
; |
|
772 |
} else if (**ptr == ':') { |
|
773 |
parseData->userInfoDelimIndex = *ptr - parseData->userInfo; |
|
774 |
++(*ptr); |
|
775 |
} else { |
|
776 |
break; |
|
777 |
} |
|
778 |
} |
|
779 |
} |
|
780 |
if (**ptr != '@') { |
|
781 |
*ptr = parseData->userInfo; |
|
782 |
parseData->userInfoDelimIndex = -1; |
|
783 |
return; |
|
784 |
} |
|
785 |
parseData->userInfoLength = *ptr - parseData->userInfo; |
|
786 |
++(*ptr); |
|
787 |
} |
|
788 |
||
789 |
// port = *DIGIT |
|
790 |
static void QT_FASTCALL _port(const char **ptr, int *port) |
|
791 |
{ |
|
792 |
bool first = true; |
|
793 |
||
794 |
for (;;) { |
|
795 |
const char *ptrBackup = *ptr; |
|
796 |
char ch = *((*ptr)++); |
|
797 |
if (ch < '0' || ch > '9') { |
|
798 |
*ptr = ptrBackup; |
|
799 |
break; |
|
800 |
} |
|
801 |
||
802 |
if (first) { |
|
803 |
first = false; |
|
804 |
*port = 0; |
|
805 |
} |
|
806 |
||
807 |
*port *= 10; |
|
808 |
*port += ch - '0'; |
|
809 |
} |
|
810 |
} |
|
811 |
||
812 |
// authority = [ userinfo "@" ] host [ ":" port ] |
|
813 |
static void QT_FASTCALL _authority(const char **ptr, QUrlParseData *parseData) |
|
814 |
{ |
|
815 |
_userInfo(ptr, parseData); |
|
816 |
_host(ptr, parseData); |
|
817 |
||
818 |
if (**ptr != ':') |
|
819 |
return; |
|
820 |
||
821 |
++(*ptr); |
|
822 |
_port(ptr, &parseData->port); |
|
823 |
} |
|
824 |
||
825 |
// pchar = unreserved / pct-encoded / sub-delims / ":" / "@" |
|
826 |
static bool QT_FASTCALL _pchar(const char **ptr) |
|
827 |
{ |
|
828 |
char c = *(*ptr); |
|
829 |
||
830 |
switch (c) { |
|
831 |
case '!': case '$': case '&': case '\'': case '(': case ')': case '*': |
|
832 |
case '+': case ',': case ';': case '=': case ':': case '@': |
|
833 |
case '-': case '.': case '_': case '~': |
|
834 |
++(*ptr); |
|
835 |
return true; |
|
836 |
default: |
|
837 |
break; |
|
838 |
}; |
|
839 |
||
840 |
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) { |
|
841 |
++(*ptr); |
|
842 |
return true; |
|
843 |
} |
|
844 |
||
845 |
if (_pctEncoded(ptr)) |
|
846 |
return true; |
|
847 |
||
848 |
return false; |
|
849 |
} |
|
850 |
||
851 |
// segment = *pchar |
|
852 |
static bool QT_FASTCALL _segmentNZ(const char **ptr) |
|
853 |
{ |
|
854 |
if (!_pchar(ptr)) |
|
855 |
return false; |
|
856 |
||
857 |
while(_pchar(ptr)) |
|
858 |
; |
|
859 |
||
860 |
return true; |
|
861 |
} |
|
862 |
||
863 |
// path-abempty = *( "/" segment ) |
|
864 |
static void QT_FASTCALL _pathAbEmpty(const char **ptr) |
|
865 |
{ |
|
866 |
for (;;) { |
|
867 |
if (**ptr != '/') |
|
868 |
break; |
|
869 |
++(*ptr); |
|
870 |
||
871 |
while (_pchar(ptr)) |
|
872 |
; |
|
873 |
} |
|
874 |
} |
|
875 |
||
876 |
// path-abs = "/" [ segment-nz *( "/" segment ) ] |
|
877 |
static bool QT_FASTCALL _pathAbs(const char **ptr) |
|
878 |
{ |
|
879 |
// **ptr == '/' already checked in caller |
|
880 |
++(*ptr); |
|
881 |
||
882 |
// we might be able to unnest this to gain some performance. |
|
883 |
if (!_segmentNZ(ptr)) |
|
884 |
return true; |
|
885 |
||
886 |
_pathAbEmpty(ptr); |
|
887 |
||
888 |
return true; |
|
889 |
} |
|
890 |
||
891 |
// path-rootless = segment-nz *( "/" segment ) |
|
892 |
static bool QT_FASTCALL _pathRootless(const char **ptr) |
|
893 |
{ |
|
894 |
// we might be able to unnest this to gain some performance. |
|
895 |
if (!_segmentNZ(ptr)) |
|
896 |
return false; |
|
897 |
||
898 |
_pathAbEmpty(ptr); |
|
899 |
||
900 |
return true; |
|
901 |
} |
|
902 |
||
903 |
||
904 |
// hier-part = "//" authority path-abempty |
|
905 |
// / path-abs |
|
906 |
// / path-rootless |
|
907 |
// / path-empty |
|
908 |
static void QT_FASTCALL _hierPart(const char **ptr, QUrlParseData *parseData) |
|
909 |
{ |
|
910 |
const char *ptrBackup = *ptr; |
|
911 |
const char *pathStart = 0; |
|
912 |
if (*((*ptr)++) == '/' && *((*ptr)++) == '/') { |
|
913 |
_authority(ptr, parseData); |
|
914 |
pathStart = *ptr; |
|
915 |
_pathAbEmpty(ptr); |
|
916 |
} else { |
|
917 |
*ptr = ptrBackup; |
|
918 |
pathStart = *ptr; |
|
919 |
if (**ptr == '/') |
|
920 |
_pathAbs(ptr); |
|
921 |
else |
|
922 |
_pathRootless(ptr); |
|
923 |
} |
|
924 |
parseData->path = pathStart; |
|
925 |
parseData->pathLength = *ptr - pathStart; |
|
926 |
} |
|
927 |
||
928 |
// query = *( pchar / "/" / "?" ) |
|
929 |
static void QT_FASTCALL _query(const char **ptr, QUrlParseData *parseData) |
|
930 |
{ |
|
931 |
parseData->query = *ptr; |
|
932 |
for (;;) { |
|
933 |
if (_pchar(ptr)) { |
|
934 |
; |
|
935 |
} else if (**ptr == '/' || **ptr == '?') { |
|
936 |
++(*ptr); |
|
937 |
} else { |
|
938 |
break; |
|
939 |
} |
|
940 |
} |
|
941 |
parseData->queryLength = *ptr - parseData->query; |
|
942 |
} |
|
943 |
||
944 |
// fragment = *( pchar / "/" / "?" ) |
|
945 |
static void QT_FASTCALL _fragment(const char **ptr, QUrlParseData *parseData) |
|
946 |
{ |
|
947 |
parseData->fragment = *ptr; |
|
948 |
for (;;) { |
|
949 |
if (_pchar(ptr)) { |
|
950 |
; |
|
951 |
} else if (**ptr == '/' || **ptr == '?' || **ptr == '#') { |
|
952 |
++(*ptr); |
|
953 |
} else { |
|
954 |
break; |
|
955 |
} |
|
956 |
} |
|
957 |
parseData->fragmentLength = *ptr - parseData->fragment; |
|
958 |
} |
|
959 |
||
960 |
struct NameprepCaseFoldingEntry { |
|
961 |
int uc; |
|
962 |
ushort mapping[4]; |
|
963 |
}; |
|
964 |
||
965 |
inline bool operator<(int one, const NameprepCaseFoldingEntry &other) |
|
966 |
{ return one < other.uc; } |
|
967 |
||
968 |
inline bool operator<(const NameprepCaseFoldingEntry &one, int other) |
|
969 |
{ return one.uc < other; } |
|
970 |
||
971 |
static const NameprepCaseFoldingEntry NameprepCaseFolding[] = { |
|
972 |
/* { 0x0041, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
973 |
{ 0x0042, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
974 |
{ 0x0043, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
975 |
{ 0x0044, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
976 |
{ 0x0045, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
977 |
{ 0x0046, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
978 |
{ 0x0047, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
979 |
{ 0x0048, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
980 |
{ 0x0049, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
981 |
{ 0x004A, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
982 |
{ 0x004B, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
983 |
{ 0x004C, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
984 |
{ 0x004D, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
985 |
{ 0x004E, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
986 |
{ 0x004F, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
987 |
{ 0x0050, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
988 |
{ 0x0051, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
989 |
{ 0x0052, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
990 |
{ 0x0053, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
991 |
{ 0x0054, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
992 |
{ 0x0055, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
993 |
{ 0x0056, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
994 |
{ 0x0057, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
995 |
{ 0x0058, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
996 |
{ 0x0059, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
997 |
{ 0x005A, { 0x007A, 0x0000, 0x0000, 0x0000 } },*/ |
|
998 |
{ 0x00B5, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
999 |
{ 0x00C0, { 0x00E0, 0x0000, 0x0000, 0x0000 } }, |
|
1000 |
{ 0x00C1, { 0x00E1, 0x0000, 0x0000, 0x0000 } }, |
|
1001 |
{ 0x00C2, { 0x00E2, 0x0000, 0x0000, 0x0000 } }, |
|
1002 |
{ 0x00C3, { 0x00E3, 0x0000, 0x0000, 0x0000 } }, |
|
1003 |
{ 0x00C4, { 0x00E4, 0x0000, 0x0000, 0x0000 } }, |
|
1004 |
{ 0x00C5, { 0x00E5, 0x0000, 0x0000, 0x0000 } }, |
|
1005 |
{ 0x00C6, { 0x00E6, 0x0000, 0x0000, 0x0000 } }, |
|
1006 |
{ 0x00C7, { 0x00E7, 0x0000, 0x0000, 0x0000 } }, |
|
1007 |
{ 0x00C8, { 0x00E8, 0x0000, 0x0000, 0x0000 } }, |
|
1008 |
{ 0x00C9, { 0x00E9, 0x0000, 0x0000, 0x0000 } }, |
|
1009 |
{ 0x00CA, { 0x00EA, 0x0000, 0x0000, 0x0000 } }, |
|
1010 |
{ 0x00CB, { 0x00EB, 0x0000, 0x0000, 0x0000 } }, |
|
1011 |
{ 0x00CC, { 0x00EC, 0x0000, 0x0000, 0x0000 } }, |
|
1012 |
{ 0x00CD, { 0x00ED, 0x0000, 0x0000, 0x0000 } }, |
|
1013 |
{ 0x00CE, { 0x00EE, 0x0000, 0x0000, 0x0000 } }, |
|
1014 |
{ 0x00CF, { 0x00EF, 0x0000, 0x0000, 0x0000 } }, |
|
1015 |
{ 0x00D0, { 0x00F0, 0x0000, 0x0000, 0x0000 } }, |
|
1016 |
{ 0x00D1, { 0x00F1, 0x0000, 0x0000, 0x0000 } }, |
|
1017 |
{ 0x00D2, { 0x00F2, 0x0000, 0x0000, 0x0000 } }, |
|
1018 |
{ 0x00D3, { 0x00F3, 0x0000, 0x0000, 0x0000 } }, |
|
1019 |
{ 0x00D4, { 0x00F4, 0x0000, 0x0000, 0x0000 } }, |
|
1020 |
{ 0x00D5, { 0x00F5, 0x0000, 0x0000, 0x0000 } }, |
|
1021 |
{ 0x00D6, { 0x00F6, 0x0000, 0x0000, 0x0000 } }, |
|
1022 |
{ 0x00D8, { 0x00F8, 0x0000, 0x0000, 0x0000 } }, |
|
1023 |
{ 0x00D9, { 0x00F9, 0x0000, 0x0000, 0x0000 } }, |
|
1024 |
{ 0x00DA, { 0x00FA, 0x0000, 0x0000, 0x0000 } }, |
|
1025 |
{ 0x00DB, { 0x00FB, 0x0000, 0x0000, 0x0000 } }, |
|
1026 |
{ 0x00DC, { 0x00FC, 0x0000, 0x0000, 0x0000 } }, |
|
1027 |
{ 0x00DD, { 0x00FD, 0x0000, 0x0000, 0x0000 } }, |
|
1028 |
{ 0x00DE, { 0x00FE, 0x0000, 0x0000, 0x0000 } }, |
|
1029 |
{ 0x00DF, { 0x0073, 0x0073, 0x0000, 0x0000 } }, |
|
1030 |
{ 0x0100, { 0x0101, 0x0000, 0x0000, 0x0000 } }, |
|
1031 |
{ 0x0102, { 0x0103, 0x0000, 0x0000, 0x0000 } }, |
|
1032 |
{ 0x0104, { 0x0105, 0x0000, 0x0000, 0x0000 } }, |
|
1033 |
{ 0x0106, { 0x0107, 0x0000, 0x0000, 0x0000 } }, |
|
1034 |
{ 0x0108, { 0x0109, 0x0000, 0x0000, 0x0000 } }, |
|
1035 |
{ 0x010A, { 0x010B, 0x0000, 0x0000, 0x0000 } }, |
|
1036 |
{ 0x010C, { 0x010D, 0x0000, 0x0000, 0x0000 } }, |
|
1037 |
{ 0x010E, { 0x010F, 0x0000, 0x0000, 0x0000 } }, |
|
1038 |
{ 0x0110, { 0x0111, 0x0000, 0x0000, 0x0000 } }, |
|
1039 |
{ 0x0112, { 0x0113, 0x0000, 0x0000, 0x0000 } }, |
|
1040 |
{ 0x0114, { 0x0115, 0x0000, 0x0000, 0x0000 } }, |
|
1041 |
{ 0x0116, { 0x0117, 0x0000, 0x0000, 0x0000 } }, |
|
1042 |
{ 0x0118, { 0x0119, 0x0000, 0x0000, 0x0000 } }, |
|
1043 |
{ 0x011A, { 0x011B, 0x0000, 0x0000, 0x0000 } }, |
|
1044 |
{ 0x011C, { 0x011D, 0x0000, 0x0000, 0x0000 } }, |
|
1045 |
{ 0x011E, { 0x011F, 0x0000, 0x0000, 0x0000 } }, |
|
1046 |
{ 0x0120, { 0x0121, 0x0000, 0x0000, 0x0000 } }, |
|
1047 |
{ 0x0122, { 0x0123, 0x0000, 0x0000, 0x0000 } }, |
|
1048 |
{ 0x0124, { 0x0125, 0x0000, 0x0000, 0x0000 } }, |
|
1049 |
{ 0x0126, { 0x0127, 0x0000, 0x0000, 0x0000 } }, |
|
1050 |
{ 0x0128, { 0x0129, 0x0000, 0x0000, 0x0000 } }, |
|
1051 |
{ 0x012A, { 0x012B, 0x0000, 0x0000, 0x0000 } }, |
|
1052 |
{ 0x012C, { 0x012D, 0x0000, 0x0000, 0x0000 } }, |
|
1053 |
{ 0x012E, { 0x012F, 0x0000, 0x0000, 0x0000 } }, |
|
1054 |
{ 0x0130, { 0x0069, 0x0307, 0x0000, 0x0000 } }, |
|
1055 |
{ 0x0132, { 0x0133, 0x0000, 0x0000, 0x0000 } }, |
|
1056 |
{ 0x0134, { 0x0135, 0x0000, 0x0000, 0x0000 } }, |
|
1057 |
{ 0x0136, { 0x0137, 0x0000, 0x0000, 0x0000 } }, |
|
1058 |
{ 0x0139, { 0x013A, 0x0000, 0x0000, 0x0000 } }, |
|
1059 |
{ 0x013B, { 0x013C, 0x0000, 0x0000, 0x0000 } }, |
|
1060 |
{ 0x013D, { 0x013E, 0x0000, 0x0000, 0x0000 } }, |
|
1061 |
{ 0x013F, { 0x0140, 0x0000, 0x0000, 0x0000 } }, |
|
1062 |
{ 0x0141, { 0x0142, 0x0000, 0x0000, 0x0000 } }, |
|
1063 |
{ 0x0143, { 0x0144, 0x0000, 0x0000, 0x0000 } }, |
|
1064 |
{ 0x0145, { 0x0146, 0x0000, 0x0000, 0x0000 } }, |
|
1065 |
{ 0x0147, { 0x0148, 0x0000, 0x0000, 0x0000 } }, |
|
1066 |
{ 0x0149, { 0x02BC, 0x006E, 0x0000, 0x0000 } }, |
|
1067 |
{ 0x014A, { 0x014B, 0x0000, 0x0000, 0x0000 } }, |
|
1068 |
{ 0x014C, { 0x014D, 0x0000, 0x0000, 0x0000 } }, |
|
1069 |
{ 0x014E, { 0x014F, 0x0000, 0x0000, 0x0000 } }, |
|
1070 |
{ 0x0150, { 0x0151, 0x0000, 0x0000, 0x0000 } }, |
|
1071 |
{ 0x0152, { 0x0153, 0x0000, 0x0000, 0x0000 } }, |
|
1072 |
{ 0x0154, { 0x0155, 0x0000, 0x0000, 0x0000 } }, |
|
1073 |
{ 0x0156, { 0x0157, 0x0000, 0x0000, 0x0000 } }, |
|
1074 |
{ 0x0158, { 0x0159, 0x0000, 0x0000, 0x0000 } }, |
|
1075 |
{ 0x015A, { 0x015B, 0x0000, 0x0000, 0x0000 } }, |
|
1076 |
{ 0x015C, { 0x015D, 0x0000, 0x0000, 0x0000 } }, |
|
1077 |
{ 0x015E, { 0x015F, 0x0000, 0x0000, 0x0000 } }, |
|
1078 |
{ 0x0160, { 0x0161, 0x0000, 0x0000, 0x0000 } }, |
|
1079 |
{ 0x0162, { 0x0163, 0x0000, 0x0000, 0x0000 } }, |
|
1080 |
{ 0x0164, { 0x0165, 0x0000, 0x0000, 0x0000 } }, |
|
1081 |
{ 0x0166, { 0x0167, 0x0000, 0x0000, 0x0000 } }, |
|
1082 |
{ 0x0168, { 0x0169, 0x0000, 0x0000, 0x0000 } }, |
|
1083 |
{ 0x016A, { 0x016B, 0x0000, 0x0000, 0x0000 } }, |
|
1084 |
{ 0x016C, { 0x016D, 0x0000, 0x0000, 0x0000 } }, |
|
1085 |
{ 0x016E, { 0x016F, 0x0000, 0x0000, 0x0000 } }, |
|
1086 |
{ 0x0170, { 0x0171, 0x0000, 0x0000, 0x0000 } }, |
|
1087 |
{ 0x0172, { 0x0173, 0x0000, 0x0000, 0x0000 } }, |
|
1088 |
{ 0x0174, { 0x0175, 0x0000, 0x0000, 0x0000 } }, |
|
1089 |
{ 0x0176, { 0x0177, 0x0000, 0x0000, 0x0000 } }, |
|
1090 |
{ 0x0178, { 0x00FF, 0x0000, 0x0000, 0x0000 } }, |
|
1091 |
{ 0x0179, { 0x017A, 0x0000, 0x0000, 0x0000 } }, |
|
1092 |
{ 0x017B, { 0x017C, 0x0000, 0x0000, 0x0000 } }, |
|
1093 |
{ 0x017D, { 0x017E, 0x0000, 0x0000, 0x0000 } }, |
|
1094 |
{ 0x017F, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
1095 |
{ 0x0181, { 0x0253, 0x0000, 0x0000, 0x0000 } }, |
|
1096 |
{ 0x0182, { 0x0183, 0x0000, 0x0000, 0x0000 } }, |
|
1097 |
{ 0x0184, { 0x0185, 0x0000, 0x0000, 0x0000 } }, |
|
1098 |
{ 0x0186, { 0x0254, 0x0000, 0x0000, 0x0000 } }, |
|
1099 |
{ 0x0187, { 0x0188, 0x0000, 0x0000, 0x0000 } }, |
|
1100 |
{ 0x0189, { 0x0256, 0x0000, 0x0000, 0x0000 } }, |
|
1101 |
{ 0x018A, { 0x0257, 0x0000, 0x0000, 0x0000 } }, |
|
1102 |
{ 0x018B, { 0x018C, 0x0000, 0x0000, 0x0000 } }, |
|
1103 |
{ 0x018E, { 0x01DD, 0x0000, 0x0000, 0x0000 } }, |
|
1104 |
{ 0x018F, { 0x0259, 0x0000, 0x0000, 0x0000 } }, |
|
1105 |
{ 0x0190, { 0x025B, 0x0000, 0x0000, 0x0000 } }, |
|
1106 |
{ 0x0191, { 0x0192, 0x0000, 0x0000, 0x0000 } }, |
|
1107 |
{ 0x0193, { 0x0260, 0x0000, 0x0000, 0x0000 } }, |
|
1108 |
{ 0x0194, { 0x0263, 0x0000, 0x0000, 0x0000 } }, |
|
1109 |
{ 0x0196, { 0x0269, 0x0000, 0x0000, 0x0000 } }, |
|
1110 |
{ 0x0197, { 0x0268, 0x0000, 0x0000, 0x0000 } }, |
|
1111 |
{ 0x0198, { 0x0199, 0x0000, 0x0000, 0x0000 } }, |
|
1112 |
{ 0x019C, { 0x026F, 0x0000, 0x0000, 0x0000 } }, |
|
1113 |
{ 0x019D, { 0x0272, 0x0000, 0x0000, 0x0000 } }, |
|
1114 |
{ 0x019F, { 0x0275, 0x0000, 0x0000, 0x0000 } }, |
|
1115 |
{ 0x01A0, { 0x01A1, 0x0000, 0x0000, 0x0000 } }, |
|
1116 |
{ 0x01A2, { 0x01A3, 0x0000, 0x0000, 0x0000 } }, |
|
1117 |
{ 0x01A4, { 0x01A5, 0x0000, 0x0000, 0x0000 } }, |
|
1118 |
{ 0x01A6, { 0x0280, 0x0000, 0x0000, 0x0000 } }, |
|
1119 |
{ 0x01A7, { 0x01A8, 0x0000, 0x0000, 0x0000 } }, |
|
1120 |
{ 0x01A9, { 0x0283, 0x0000, 0x0000, 0x0000 } }, |
|
1121 |
{ 0x01AC, { 0x01AD, 0x0000, 0x0000, 0x0000 } }, |
|
1122 |
{ 0x01AE, { 0x0288, 0x0000, 0x0000, 0x0000 } }, |
|
1123 |
{ 0x01AF, { 0x01B0, 0x0000, 0x0000, 0x0000 } }, |
|
1124 |
{ 0x01B1, { 0x028A, 0x0000, 0x0000, 0x0000 } }, |
|
1125 |
{ 0x01B2, { 0x028B, 0x0000, 0x0000, 0x0000 } }, |
|
1126 |
{ 0x01B3, { 0x01B4, 0x0000, 0x0000, 0x0000 } }, |
|
1127 |
{ 0x01B5, { 0x01B6, 0x0000, 0x0000, 0x0000 } }, |
|
1128 |
{ 0x01B7, { 0x0292, 0x0000, 0x0000, 0x0000 } }, |
|
1129 |
{ 0x01B8, { 0x01B9, 0x0000, 0x0000, 0x0000 } }, |
|
1130 |
{ 0x01BC, { 0x01BD, 0x0000, 0x0000, 0x0000 } }, |
|
1131 |
{ 0x01C4, { 0x01C6, 0x0000, 0x0000, 0x0000 } }, |
|
1132 |
{ 0x01C5, { 0x01C6, 0x0000, 0x0000, 0x0000 } }, |
|
1133 |
{ 0x01C7, { 0x01C9, 0x0000, 0x0000, 0x0000 } }, |
|
1134 |
{ 0x01C8, { 0x01C9, 0x0000, 0x0000, 0x0000 } }, |
|
1135 |
{ 0x01CA, { 0x01CC, 0x0000, 0x0000, 0x0000 } }, |
|
1136 |
{ 0x01CB, { 0x01CC, 0x0000, 0x0000, 0x0000 } }, |
|
1137 |
{ 0x01CD, { 0x01CE, 0x0000, 0x0000, 0x0000 } }, |
|
1138 |
{ 0x01CF, { 0x01D0, 0x0000, 0x0000, 0x0000 } }, |
|
1139 |
{ 0x01D1, { 0x01D2, 0x0000, 0x0000, 0x0000 } }, |
|
1140 |
{ 0x01D3, { 0x01D4, 0x0000, 0x0000, 0x0000 } }, |
|
1141 |
{ 0x01D5, { 0x01D6, 0x0000, 0x0000, 0x0000 } }, |
|
1142 |
{ 0x01D7, { 0x01D8, 0x0000, 0x0000, 0x0000 } }, |
|
1143 |
{ 0x01D9, { 0x01DA, 0x0000, 0x0000, 0x0000 } }, |
|
1144 |
{ 0x01DB, { 0x01DC, 0x0000, 0x0000, 0x0000 } }, |
|
1145 |
{ 0x01DE, { 0x01DF, 0x0000, 0x0000, 0x0000 } }, |
|
1146 |
{ 0x01E0, { 0x01E1, 0x0000, 0x0000, 0x0000 } }, |
|
1147 |
{ 0x01E2, { 0x01E3, 0x0000, 0x0000, 0x0000 } }, |
|
1148 |
{ 0x01E4, { 0x01E5, 0x0000, 0x0000, 0x0000 } }, |
|
1149 |
{ 0x01E6, { 0x01E7, 0x0000, 0x0000, 0x0000 } }, |
|
1150 |
{ 0x01E8, { 0x01E9, 0x0000, 0x0000, 0x0000 } }, |
|
1151 |
{ 0x01EA, { 0x01EB, 0x0000, 0x0000, 0x0000 } }, |
|
1152 |
{ 0x01EC, { 0x01ED, 0x0000, 0x0000, 0x0000 } }, |
|
1153 |
{ 0x01EE, { 0x01EF, 0x0000, 0x0000, 0x0000 } }, |
|
1154 |
{ 0x01F0, { 0x006A, 0x030C, 0x0000, 0x0000 } }, |
|
1155 |
{ 0x01F1, { 0x01F3, 0x0000, 0x0000, 0x0000 } }, |
|
1156 |
{ 0x01F2, { 0x01F3, 0x0000, 0x0000, 0x0000 } }, |
|
1157 |
{ 0x01F4, { 0x01F5, 0x0000, 0x0000, 0x0000 } }, |
|
1158 |
{ 0x01F6, { 0x0195, 0x0000, 0x0000, 0x0000 } }, |
|
1159 |
{ 0x01F7, { 0x01BF, 0x0000, 0x0000, 0x0000 } }, |
|
1160 |
{ 0x01F8, { 0x01F9, 0x0000, 0x0000, 0x0000 } }, |
|
1161 |
{ 0x01FA, { 0x01FB, 0x0000, 0x0000, 0x0000 } }, |
|
1162 |
{ 0x01FC, { 0x01FD, 0x0000, 0x0000, 0x0000 } }, |
|
1163 |
{ 0x01FE, { 0x01FF, 0x0000, 0x0000, 0x0000 } }, |
|
1164 |
{ 0x0200, { 0x0201, 0x0000, 0x0000, 0x0000 } }, |
|
1165 |
{ 0x0202, { 0x0203, 0x0000, 0x0000, 0x0000 } }, |
|
1166 |
{ 0x0204, { 0x0205, 0x0000, 0x0000, 0x0000 } }, |
|
1167 |
{ 0x0206, { 0x0207, 0x0000, 0x0000, 0x0000 } }, |
|
1168 |
{ 0x0208, { 0x0209, 0x0000, 0x0000, 0x0000 } }, |
|
1169 |
{ 0x020A, { 0x020B, 0x0000, 0x0000, 0x0000 } }, |
|
1170 |
{ 0x020C, { 0x020D, 0x0000, 0x0000, 0x0000 } }, |
|
1171 |
{ 0x020E, { 0x020F, 0x0000, 0x0000, 0x0000 } }, |
|
1172 |
{ 0x0210, { 0x0211, 0x0000, 0x0000, 0x0000 } }, |
|
1173 |
{ 0x0212, { 0x0213, 0x0000, 0x0000, 0x0000 } }, |
|
1174 |
{ 0x0214, { 0x0215, 0x0000, 0x0000, 0x0000 } }, |
|
1175 |
{ 0x0216, { 0x0217, 0x0000, 0x0000, 0x0000 } }, |
|
1176 |
{ 0x0218, { 0x0219, 0x0000, 0x0000, 0x0000 } }, |
|
1177 |
{ 0x021A, { 0x021B, 0x0000, 0x0000, 0x0000 } }, |
|
1178 |
{ 0x021C, { 0x021D, 0x0000, 0x0000, 0x0000 } }, |
|
1179 |
{ 0x021E, { 0x021F, 0x0000, 0x0000, 0x0000 } }, |
|
1180 |
{ 0x0220, { 0x019E, 0x0000, 0x0000, 0x0000 } }, |
|
1181 |
{ 0x0222, { 0x0223, 0x0000, 0x0000, 0x0000 } }, |
|
1182 |
{ 0x0224, { 0x0225, 0x0000, 0x0000, 0x0000 } }, |
|
1183 |
{ 0x0226, { 0x0227, 0x0000, 0x0000, 0x0000 } }, |
|
1184 |
{ 0x0228, { 0x0229, 0x0000, 0x0000, 0x0000 } }, |
|
1185 |
{ 0x022A, { 0x022B, 0x0000, 0x0000, 0x0000 } }, |
|
1186 |
{ 0x022C, { 0x022D, 0x0000, 0x0000, 0x0000 } }, |
|
1187 |
{ 0x022E, { 0x022F, 0x0000, 0x0000, 0x0000 } }, |
|
1188 |
{ 0x0230, { 0x0231, 0x0000, 0x0000, 0x0000 } }, |
|
1189 |
{ 0x0232, { 0x0233, 0x0000, 0x0000, 0x0000 } }, |
|
1190 |
{ 0x0345, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
1191 |
{ 0x037A, { 0x0020, 0x03B9, 0x0000, 0x0000 } }, |
|
1192 |
{ 0x0386, { 0x03AC, 0x0000, 0x0000, 0x0000 } }, |
|
1193 |
{ 0x0388, { 0x03AD, 0x0000, 0x0000, 0x0000 } }, |
|
1194 |
{ 0x0389, { 0x03AE, 0x0000, 0x0000, 0x0000 } }, |
|
1195 |
{ 0x038A, { 0x03AF, 0x0000, 0x0000, 0x0000 } }, |
|
1196 |
{ 0x038C, { 0x03CC, 0x0000, 0x0000, 0x0000 } }, |
|
1197 |
{ 0x038E, { 0x03CD, 0x0000, 0x0000, 0x0000 } }, |
|
1198 |
{ 0x038F, { 0x03CE, 0x0000, 0x0000, 0x0000 } }, |
|
1199 |
{ 0x0390, { 0x03B9, 0x0308, 0x0301, 0x0000 } }, |
|
1200 |
{ 0x0391, { 0x03B1, 0x0000, 0x0000, 0x0000 } }, |
|
1201 |
{ 0x0392, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
1202 |
{ 0x0393, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
1203 |
{ 0x0394, { 0x03B4, 0x0000, 0x0000, 0x0000 } }, |
|
1204 |
{ 0x0395, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
1205 |
{ 0x0396, { 0x03B6, 0x0000, 0x0000, 0x0000 } }, |
|
1206 |
{ 0x0397, { 0x03B7, 0x0000, 0x0000, 0x0000 } }, |
|
1207 |
{ 0x0398, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
1208 |
{ 0x0399, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
1209 |
{ 0x039A, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
1210 |
{ 0x039B, { 0x03BB, 0x0000, 0x0000, 0x0000 } }, |
|
1211 |
{ 0x039C, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
1212 |
{ 0x039D, { 0x03BD, 0x0000, 0x0000, 0x0000 } }, |
|
1213 |
{ 0x039E, { 0x03BE, 0x0000, 0x0000, 0x0000 } }, |
|
1214 |
{ 0x039F, { 0x03BF, 0x0000, 0x0000, 0x0000 } }, |
|
1215 |
{ 0x03A0, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
1216 |
{ 0x03A1, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
1217 |
{ 0x03A3, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
1218 |
{ 0x03A4, { 0x03C4, 0x0000, 0x0000, 0x0000 } }, |
|
1219 |
{ 0x03A5, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
1220 |
{ 0x03A6, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
1221 |
{ 0x03A7, { 0x03C7, 0x0000, 0x0000, 0x0000 } }, |
|
1222 |
{ 0x03A8, { 0x03C8, 0x0000, 0x0000, 0x0000 } }, |
|
1223 |
{ 0x03A9, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
1224 |
{ 0x03AA, { 0x03CA, 0x0000, 0x0000, 0x0000 } }, |
|
1225 |
{ 0x03AB, { 0x03CB, 0x0000, 0x0000, 0x0000 } }, |
|
1226 |
{ 0x03B0, { 0x03C5, 0x0308, 0x0301, 0x0000 } }, |
|
1227 |
{ 0x03C2, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
1228 |
{ 0x03D0, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
1229 |
{ 0x03D1, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
1230 |
{ 0x03D2, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
1231 |
{ 0x03D3, { 0x03CD, 0x0000, 0x0000, 0x0000 } }, |
|
1232 |
{ 0x03D4, { 0x03CB, 0x0000, 0x0000, 0x0000 } }, |
|
1233 |
{ 0x03D5, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
1234 |
{ 0x03D6, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
1235 |
{ 0x03D8, { 0x03D9, 0x0000, 0x0000, 0x0000 } }, |
|
1236 |
{ 0x03DA, { 0x03DB, 0x0000, 0x0000, 0x0000 } }, |
|
1237 |
{ 0x03DC, { 0x03DD, 0x0000, 0x0000, 0x0000 } }, |
|
1238 |
{ 0x03DE, { 0x03DF, 0x0000, 0x0000, 0x0000 } }, |
|
1239 |
{ 0x03E0, { 0x03E1, 0x0000, 0x0000, 0x0000 } }, |
|
1240 |
{ 0x03E2, { 0x03E3, 0x0000, 0x0000, 0x0000 } }, |
|
1241 |
{ 0x03E4, { 0x03E5, 0x0000, 0x0000, 0x0000 } }, |
|
1242 |
{ 0x03E6, { 0x03E7, 0x0000, 0x0000, 0x0000 } }, |
|
1243 |
{ 0x03E8, { 0x03E9, 0x0000, 0x0000, 0x0000 } }, |
|
1244 |
{ 0x03EA, { 0x03EB, 0x0000, 0x0000, 0x0000 } }, |
|
1245 |
{ 0x03EC, { 0x03ED, 0x0000, 0x0000, 0x0000 } }, |
|
1246 |
{ 0x03EE, { 0x03EF, 0x0000, 0x0000, 0x0000 } }, |
|
1247 |
{ 0x03F0, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
1248 |
{ 0x03F1, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
1249 |
{ 0x03F2, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
1250 |
{ 0x03F4, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
1251 |
{ 0x03F5, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
1252 |
{ 0x0400, { 0x0450, 0x0000, 0x0000, 0x0000 } }, |
|
1253 |
{ 0x0401, { 0x0451, 0x0000, 0x0000, 0x0000 } }, |
|
1254 |
{ 0x0402, { 0x0452, 0x0000, 0x0000, 0x0000 } }, |
|
1255 |
{ 0x0403, { 0x0453, 0x0000, 0x0000, 0x0000 } }, |
|
1256 |
{ 0x0404, { 0x0454, 0x0000, 0x0000, 0x0000 } }, |
|
1257 |
{ 0x0405, { 0x0455, 0x0000, 0x0000, 0x0000 } }, |
|
1258 |
{ 0x0406, { 0x0456, 0x0000, 0x0000, 0x0000 } }, |
|
1259 |
{ 0x0407, { 0x0457, 0x0000, 0x0000, 0x0000 } }, |
|
1260 |
{ 0x0408, { 0x0458, 0x0000, 0x0000, 0x0000 } }, |
|
1261 |
{ 0x0409, { 0x0459, 0x0000, 0x0000, 0x0000 } }, |
|
1262 |
{ 0x040A, { 0x045A, 0x0000, 0x0000, 0x0000 } }, |
|
1263 |
{ 0x040B, { 0x045B, 0x0000, 0x0000, 0x0000 } }, |
|
1264 |
{ 0x040C, { 0x045C, 0x0000, 0x0000, 0x0000 } }, |
|
1265 |
{ 0x040D, { 0x045D, 0x0000, 0x0000, 0x0000 } }, |
|
1266 |
{ 0x040E, { 0x045E, 0x0000, 0x0000, 0x0000 } }, |
|
1267 |
{ 0x040F, { 0x045F, 0x0000, 0x0000, 0x0000 } }, |
|
1268 |
{ 0x0410, { 0x0430, 0x0000, 0x0000, 0x0000 } }, |
|
1269 |
{ 0x0411, { 0x0431, 0x0000, 0x0000, 0x0000 } }, |
|
1270 |
{ 0x0412, { 0x0432, 0x0000, 0x0000, 0x0000 } }, |
|
1271 |
{ 0x0413, { 0x0433, 0x0000, 0x0000, 0x0000 } }, |
|
1272 |
{ 0x0414, { 0x0434, 0x0000, 0x0000, 0x0000 } }, |
|
1273 |
{ 0x0415, { 0x0435, 0x0000, 0x0000, 0x0000 } }, |
|
1274 |
{ 0x0416, { 0x0436, 0x0000, 0x0000, 0x0000 } }, |
|
1275 |
{ 0x0417, { 0x0437, 0x0000, 0x0000, 0x0000 } }, |
|
1276 |
{ 0x0418, { 0x0438, 0x0000, 0x0000, 0x0000 } }, |
|
1277 |
{ 0x0419, { 0x0439, 0x0000, 0x0000, 0x0000 } }, |
|
1278 |
{ 0x041A, { 0x043A, 0x0000, 0x0000, 0x0000 } }, |
|
1279 |
{ 0x041B, { 0x043B, 0x0000, 0x0000, 0x0000 } }, |
|
1280 |
{ 0x041C, { 0x043C, 0x0000, 0x0000, 0x0000 } }, |
|
1281 |
{ 0x041D, { 0x043D, 0x0000, 0x0000, 0x0000 } }, |
|
1282 |
{ 0x041E, { 0x043E, 0x0000, 0x0000, 0x0000 } }, |
|
1283 |
{ 0x041F, { 0x043F, 0x0000, 0x0000, 0x0000 } }, |
|
1284 |
{ 0x0420, { 0x0440, 0x0000, 0x0000, 0x0000 } }, |
|
1285 |
{ 0x0421, { 0x0441, 0x0000, 0x0000, 0x0000 } }, |
|
1286 |
{ 0x0422, { 0x0442, 0x0000, 0x0000, 0x0000 } }, |
|
1287 |
{ 0x0423, { 0x0443, 0x0000, 0x0000, 0x0000 } }, |
|
1288 |
{ 0x0424, { 0x0444, 0x0000, 0x0000, 0x0000 } }, |
|
1289 |
{ 0x0425, { 0x0445, 0x0000, 0x0000, 0x0000 } }, |
|
1290 |
{ 0x0426, { 0x0446, 0x0000, 0x0000, 0x0000 } }, |
|
1291 |
{ 0x0427, { 0x0447, 0x0000, 0x0000, 0x0000 } }, |
|
1292 |
{ 0x0428, { 0x0448, 0x0000, 0x0000, 0x0000 } }, |
|
1293 |
{ 0x0429, { 0x0449, 0x0000, 0x0000, 0x0000 } }, |
|
1294 |
{ 0x042A, { 0x044A, 0x0000, 0x0000, 0x0000 } }, |
|
1295 |
{ 0x042B, { 0x044B, 0x0000, 0x0000, 0x0000 } }, |
|
1296 |
{ 0x042C, { 0x044C, 0x0000, 0x0000, 0x0000 } }, |
|
1297 |
{ 0x042D, { 0x044D, 0x0000, 0x0000, 0x0000 } }, |
|
1298 |
{ 0x042E, { 0x044E, 0x0000, 0x0000, 0x0000 } }, |
|
1299 |
{ 0x042F, { 0x044F, 0x0000, 0x0000, 0x0000 } }, |
|
1300 |
{ 0x0460, { 0x0461, 0x0000, 0x0000, 0x0000 } }, |
|
1301 |
{ 0x0462, { 0x0463, 0x0000, 0x0000, 0x0000 } }, |
|
1302 |
{ 0x0464, { 0x0465, 0x0000, 0x0000, 0x0000 } }, |
|
1303 |
{ 0x0466, { 0x0467, 0x0000, 0x0000, 0x0000 } }, |
|
1304 |
{ 0x0468, { 0x0469, 0x0000, 0x0000, 0x0000 } }, |
|
1305 |
{ 0x046A, { 0x046B, 0x0000, 0x0000, 0x0000 } }, |
|
1306 |
{ 0x046C, { 0x046D, 0x0000, 0x0000, 0x0000 } }, |
|
1307 |
{ 0x046E, { 0x046F, 0x0000, 0x0000, 0x0000 } }, |
|
1308 |
{ 0x0470, { 0x0471, 0x0000, 0x0000, 0x0000 } }, |
|
1309 |
{ 0x0472, { 0x0473, 0x0000, 0x0000, 0x0000 } }, |
|
1310 |
{ 0x0474, { 0x0475, 0x0000, 0x0000, 0x0000 } }, |
|
1311 |
{ 0x0476, { 0x0477, 0x0000, 0x0000, 0x0000 } }, |
|
1312 |
{ 0x0478, { 0x0479, 0x0000, 0x0000, 0x0000 } }, |
|
1313 |
{ 0x047A, { 0x047B, 0x0000, 0x0000, 0x0000 } }, |
|
1314 |
{ 0x047C, { 0x047D, 0x0000, 0x0000, 0x0000 } }, |
|
1315 |
{ 0x047E, { 0x047F, 0x0000, 0x0000, 0x0000 } }, |
|
1316 |
{ 0x0480, { 0x0481, 0x0000, 0x0000, 0x0000 } }, |
|
1317 |
{ 0x048A, { 0x048B, 0x0000, 0x0000, 0x0000 } }, |
|
1318 |
{ 0x048C, { 0x048D, 0x0000, 0x0000, 0x0000 } }, |
|
1319 |
{ 0x048E, { 0x048F, 0x0000, 0x0000, 0x0000 } }, |
|
1320 |
{ 0x0490, { 0x0491, 0x0000, 0x0000, 0x0000 } }, |
|
1321 |
{ 0x0492, { 0x0493, 0x0000, 0x0000, 0x0000 } }, |
|
1322 |
{ 0x0494, { 0x0495, 0x0000, 0x0000, 0x0000 } }, |
|
1323 |
{ 0x0496, { 0x0497, 0x0000, 0x0000, 0x0000 } }, |
|
1324 |
{ 0x0498, { 0x0499, 0x0000, 0x0000, 0x0000 } }, |
|
1325 |
{ 0x049A, { 0x049B, 0x0000, 0x0000, 0x0000 } }, |
|
1326 |
{ 0x049C, { 0x049D, 0x0000, 0x0000, 0x0000 } }, |
|
1327 |
{ 0x049E, { 0x049F, 0x0000, 0x0000, 0x0000 } }, |
|
1328 |
{ 0x04A0, { 0x04A1, 0x0000, 0x0000, 0x0000 } }, |
|
1329 |
{ 0x04A2, { 0x04A3, 0x0000, 0x0000, 0x0000 } }, |
|
1330 |
{ 0x04A4, { 0x04A5, 0x0000, 0x0000, 0x0000 } }, |
|
1331 |
{ 0x04A6, { 0x04A7, 0x0000, 0x0000, 0x0000 } }, |
|
1332 |
{ 0x04A8, { 0x04A9, 0x0000, 0x0000, 0x0000 } }, |
|
1333 |
{ 0x04AA, { 0x04AB, 0x0000, 0x0000, 0x0000 } }, |
|
1334 |
{ 0x04AC, { 0x04AD, 0x0000, 0x0000, 0x0000 } }, |
|
1335 |
{ 0x04AE, { 0x04AF, 0x0000, 0x0000, 0x0000 } }, |
|
1336 |
{ 0x04B0, { 0x04B1, 0x0000, 0x0000, 0x0000 } }, |
|
1337 |
{ 0x04B2, { 0x04B3, 0x0000, 0x0000, 0x0000 } }, |
|
1338 |
{ 0x04B4, { 0x04B5, 0x0000, 0x0000, 0x0000 } }, |
|
1339 |
{ 0x04B6, { 0x04B7, 0x0000, 0x0000, 0x0000 } }, |
|
1340 |
{ 0x04B8, { 0x04B9, 0x0000, 0x0000, 0x0000 } }, |
|
1341 |
{ 0x04BA, { 0x04BB, 0x0000, 0x0000, 0x0000 } }, |
|
1342 |
{ 0x04BC, { 0x04BD, 0x0000, 0x0000, 0x0000 } }, |
|
1343 |
{ 0x04BE, { 0x04BF, 0x0000, 0x0000, 0x0000 } }, |
|
1344 |
{ 0x04C1, { 0x04C2, 0x0000, 0x0000, 0x0000 } }, |
|
1345 |
{ 0x04C3, { 0x04C4, 0x0000, 0x0000, 0x0000 } }, |
|
1346 |
{ 0x04C5, { 0x04C6, 0x0000, 0x0000, 0x0000 } }, |
|
1347 |
{ 0x04C7, { 0x04C8, 0x0000, 0x0000, 0x0000 } }, |
|
1348 |
{ 0x04C9, { 0x04CA, 0x0000, 0x0000, 0x0000 } }, |
|
1349 |
{ 0x04CB, { 0x04CC, 0x0000, 0x0000, 0x0000 } }, |
|
1350 |
{ 0x04CD, { 0x04CE, 0x0000, 0x0000, 0x0000 } }, |
|
1351 |
{ 0x04D0, { 0x04D1, 0x0000, 0x0000, 0x0000 } }, |
|
1352 |
{ 0x04D2, { 0x04D3, 0x0000, 0x0000, 0x0000 } }, |
|
1353 |
{ 0x04D4, { 0x04D5, 0x0000, 0x0000, 0x0000 } }, |
|
1354 |
{ 0x04D6, { 0x04D7, 0x0000, 0x0000, 0x0000 } }, |
|
1355 |
{ 0x04D8, { 0x04D9, 0x0000, 0x0000, 0x0000 } }, |
|
1356 |
{ 0x04DA, { 0x04DB, 0x0000, 0x0000, 0x0000 } }, |
|
1357 |
{ 0x04DC, { 0x04DD, 0x0000, 0x0000, 0x0000 } }, |
|
1358 |
{ 0x04DE, { 0x04DF, 0x0000, 0x0000, 0x0000 } }, |
|
1359 |
{ 0x04E0, { 0x04E1, 0x0000, 0x0000, 0x0000 } }, |
|
1360 |
{ 0x04E2, { 0x04E3, 0x0000, 0x0000, 0x0000 } }, |
|
1361 |
{ 0x04E4, { 0x04E5, 0x0000, 0x0000, 0x0000 } }, |
|
1362 |
{ 0x04E6, { 0x04E7, 0x0000, 0x0000, 0x0000 } }, |
|
1363 |
{ 0x04E8, { 0x04E9, 0x0000, 0x0000, 0x0000 } }, |
|
1364 |
{ 0x04EA, { 0x04EB, 0x0000, 0x0000, 0x0000 } }, |
|
1365 |
{ 0x04EC, { 0x04ED, 0x0000, 0x0000, 0x0000 } }, |
|
1366 |
{ 0x04EE, { 0x04EF, 0x0000, 0x0000, 0x0000 } }, |
|
1367 |
{ 0x04F0, { 0x04F1, 0x0000, 0x0000, 0x0000 } }, |
|
1368 |
{ 0x04F2, { 0x04F3, 0x0000, 0x0000, 0x0000 } }, |
|
1369 |
{ 0x04F4, { 0x04F5, 0x0000, 0x0000, 0x0000 } }, |
|
1370 |
{ 0x04F8, { 0x04F9, 0x0000, 0x0000, 0x0000 } }, |
|
1371 |
{ 0x0500, { 0x0501, 0x0000, 0x0000, 0x0000 } }, |
|
1372 |
{ 0x0502, { 0x0503, 0x0000, 0x0000, 0x0000 } }, |
|
1373 |
{ 0x0504, { 0x0505, 0x0000, 0x0000, 0x0000 } }, |
|
1374 |
{ 0x0506, { 0x0507, 0x0000, 0x0000, 0x0000 } }, |
|
1375 |
{ 0x0508, { 0x0509, 0x0000, 0x0000, 0x0000 } }, |
|
1376 |
{ 0x050A, { 0x050B, 0x0000, 0x0000, 0x0000 } }, |
|
1377 |
{ 0x050C, { 0x050D, 0x0000, 0x0000, 0x0000 } }, |
|
1378 |
{ 0x050E, { 0x050F, 0x0000, 0x0000, 0x0000 } }, |
|
1379 |
{ 0x0531, { 0x0561, 0x0000, 0x0000, 0x0000 } }, |
|
1380 |
{ 0x0532, { 0x0562, 0x0000, 0x0000, 0x0000 } }, |
|
1381 |
{ 0x0533, { 0x0563, 0x0000, 0x0000, 0x0000 } }, |
|
1382 |
{ 0x0534, { 0x0564, 0x0000, 0x0000, 0x0000 } }, |
|
1383 |
{ 0x0535, { 0x0565, 0x0000, 0x0000, 0x0000 } }, |
|
1384 |
{ 0x0536, { 0x0566, 0x0000, 0x0000, 0x0000 } }, |
|
1385 |
{ 0x0537, { 0x0567, 0x0000, 0x0000, 0x0000 } }, |
|
1386 |
{ 0x0538, { 0x0568, 0x0000, 0x0000, 0x0000 } }, |
|
1387 |
{ 0x0539, { 0x0569, 0x0000, 0x0000, 0x0000 } }, |
|
1388 |
{ 0x053A, { 0x056A, 0x0000, 0x0000, 0x0000 } }, |
|
1389 |
{ 0x053B, { 0x056B, 0x0000, 0x0000, 0x0000 } }, |
|
1390 |
{ 0x053C, { 0x056C, 0x0000, 0x0000, 0x0000 } }, |
|
1391 |
{ 0x053D, { 0x056D, 0x0000, 0x0000, 0x0000 } }, |
|
1392 |
{ 0x053E, { 0x056E, 0x0000, 0x0000, 0x0000 } }, |
|
1393 |
{ 0x053F, { 0x056F, 0x0000, 0x0000, 0x0000 } }, |
|
1394 |
{ 0x0540, { 0x0570, 0x0000, 0x0000, 0x0000 } }, |
|
1395 |
{ 0x0541, { 0x0571, 0x0000, 0x0000, 0x0000 } }, |
|
1396 |
{ 0x0542, { 0x0572, 0x0000, 0x0000, 0x0000 } }, |
|
1397 |
{ 0x0543, { 0x0573, 0x0000, 0x0000, 0x0000 } }, |
|
1398 |
{ 0x0544, { 0x0574, 0x0000, 0x0000, 0x0000 } }, |
|
1399 |
{ 0x0545, { 0x0575, 0x0000, 0x0000, 0x0000 } }, |
|
1400 |
{ 0x0546, { 0x0576, 0x0000, 0x0000, 0x0000 } }, |
|
1401 |
{ 0x0547, { 0x0577, 0x0000, 0x0000, 0x0000 } }, |
|
1402 |
{ 0x0548, { 0x0578, 0x0000, 0x0000, 0x0000 } }, |
|
1403 |
{ 0x0549, { 0x0579, 0x0000, 0x0000, 0x0000 } }, |
|
1404 |
{ 0x054A, { 0x057A, 0x0000, 0x0000, 0x0000 } }, |
|
1405 |
{ 0x054B, { 0x057B, 0x0000, 0x0000, 0x0000 } }, |
|
1406 |
{ 0x054C, { 0x057C, 0x0000, 0x0000, 0x0000 } }, |
|
1407 |
{ 0x054D, { 0x057D, 0x0000, 0x0000, 0x0000 } }, |
|
1408 |
{ 0x054E, { 0x057E, 0x0000, 0x0000, 0x0000 } }, |
|
1409 |
{ 0x054F, { 0x057F, 0x0000, 0x0000, 0x0000 } }, |
|
1410 |
{ 0x0550, { 0x0580, 0x0000, 0x0000, 0x0000 } }, |
|
1411 |
{ 0x0551, { 0x0581, 0x0000, 0x0000, 0x0000 } }, |
|
1412 |
{ 0x0552, { 0x0582, 0x0000, 0x0000, 0x0000 } }, |
|
1413 |
{ 0x0553, { 0x0583, 0x0000, 0x0000, 0x0000 } }, |
|
1414 |
{ 0x0554, { 0x0584, 0x0000, 0x0000, 0x0000 } }, |
|
1415 |
{ 0x0555, { 0x0585, 0x0000, 0x0000, 0x0000 } }, |
|
1416 |
{ 0x0556, { 0x0586, 0x0000, 0x0000, 0x0000 } }, |
|
1417 |
{ 0x0587, { 0x0565, 0x0582, 0x0000, 0x0000 } }, |
|
1418 |
{ 0x1E00, { 0x1E01, 0x0000, 0x0000, 0x0000 } }, |
|
1419 |
{ 0x1E02, { 0x1E03, 0x0000, 0x0000, 0x0000 } }, |
|
1420 |
{ 0x1E04, { 0x1E05, 0x0000, 0x0000, 0x0000 } }, |
|
1421 |
{ 0x1E06, { 0x1E07, 0x0000, 0x0000, 0x0000 } }, |
|
1422 |
{ 0x1E08, { 0x1E09, 0x0000, 0x0000, 0x0000 } }, |
|
1423 |
{ 0x1E0A, { 0x1E0B, 0x0000, 0x0000, 0x0000 } }, |
|
1424 |
{ 0x1E0C, { 0x1E0D, 0x0000, 0x0000, 0x0000 } }, |
|
1425 |
{ 0x1E0E, { 0x1E0F, 0x0000, 0x0000, 0x0000 } }, |
|
1426 |
{ 0x1E10, { 0x1E11, 0x0000, 0x0000, 0x0000 } }, |
|
1427 |
{ 0x1E12, { 0x1E13, 0x0000, 0x0000, 0x0000 } }, |
|
1428 |
{ 0x1E14, { 0x1E15, 0x0000, 0x0000, 0x0000 } }, |
|
1429 |
{ 0x1E16, { 0x1E17, 0x0000, 0x0000, 0x0000 } }, |
|
1430 |
{ 0x1E18, { 0x1E19, 0x0000, 0x0000, 0x0000 } }, |
|
1431 |
{ 0x1E1A, { 0x1E1B, 0x0000, 0x0000, 0x0000 } }, |
|
1432 |
{ 0x1E1C, { 0x1E1D, 0x0000, 0x0000, 0x0000 } }, |
|
1433 |
{ 0x1E1E, { 0x1E1F, 0x0000, 0x0000, 0x0000 } }, |
|
1434 |
{ 0x1E20, { 0x1E21, 0x0000, 0x0000, 0x0000 } }, |
|
1435 |
{ 0x1E22, { 0x1E23, 0x0000, 0x0000, 0x0000 } }, |
|
1436 |
{ 0x1E24, { 0x1E25, 0x0000, 0x0000, 0x0000 } }, |
|
1437 |
{ 0x1E26, { 0x1E27, 0x0000, 0x0000, 0x0000 } }, |
|
1438 |
{ 0x1E28, { 0x1E29, 0x0000, 0x0000, 0x0000 } }, |
|
1439 |
{ 0x1E2A, { 0x1E2B, 0x0000, 0x0000, 0x0000 } }, |
|
1440 |
{ 0x1E2C, { 0x1E2D, 0x0000, 0x0000, 0x0000 } }, |
|
1441 |
{ 0x1E2E, { 0x1E2F, 0x0000, 0x0000, 0x0000 } }, |
|
1442 |
{ 0x1E30, { 0x1E31, 0x0000, 0x0000, 0x0000 } }, |
|
1443 |
{ 0x1E32, { 0x1E33, 0x0000, 0x0000, 0x0000 } }, |
|
1444 |
{ 0x1E34, { 0x1E35, 0x0000, 0x0000, 0x0000 } }, |
|
1445 |
{ 0x1E36, { 0x1E37, 0x0000, 0x0000, 0x0000 } }, |
|
1446 |
{ 0x1E38, { 0x1E39, 0x0000, 0x0000, 0x0000 } }, |
|
1447 |
{ 0x1E3A, { 0x1E3B, 0x0000, 0x0000, 0x0000 } }, |
|
1448 |
{ 0x1E3C, { 0x1E3D, 0x0000, 0x0000, 0x0000 } }, |
|
1449 |
{ 0x1E3E, { 0x1E3F, 0x0000, 0x0000, 0x0000 } }, |
|
1450 |
{ 0x1E40, { 0x1E41, 0x0000, 0x0000, 0x0000 } }, |
|
1451 |
{ 0x1E42, { 0x1E43, 0x0000, 0x0000, 0x0000 } }, |
|
1452 |
{ 0x1E44, { 0x1E45, 0x0000, 0x0000, 0x0000 } }, |
|
1453 |
{ 0x1E46, { 0x1E47, 0x0000, 0x0000, 0x0000 } }, |
|
1454 |
{ 0x1E48, { 0x1E49, 0x0000, 0x0000, 0x0000 } }, |
|
1455 |
{ 0x1E4A, { 0x1E4B, 0x0000, 0x0000, 0x0000 } }, |
|
1456 |
{ 0x1E4C, { 0x1E4D, 0x0000, 0x0000, 0x0000 } }, |
|
1457 |
{ 0x1E4E, { 0x1E4F, 0x0000, 0x0000, 0x0000 } }, |
|
1458 |
{ 0x1E50, { 0x1E51, 0x0000, 0x0000, 0x0000 } }, |
|
1459 |
{ 0x1E52, { 0x1E53, 0x0000, 0x0000, 0x0000 } }, |
|
1460 |
{ 0x1E54, { 0x1E55, 0x0000, 0x0000, 0x0000 } }, |
|
1461 |
{ 0x1E56, { 0x1E57, 0x0000, 0x0000, 0x0000 } }, |
|
1462 |
{ 0x1E58, { 0x1E59, 0x0000, 0x0000, 0x0000 } }, |
|
1463 |
{ 0x1E5A, { 0x1E5B, 0x0000, 0x0000, 0x0000 } }, |
|
1464 |
{ 0x1E5C, { 0x1E5D, 0x0000, 0x0000, 0x0000 } }, |
|
1465 |
{ 0x1E5E, { 0x1E5F, 0x0000, 0x0000, 0x0000 } }, |
|
1466 |
{ 0x1E60, { 0x1E61, 0x0000, 0x0000, 0x0000 } }, |
|
1467 |
{ 0x1E62, { 0x1E63, 0x0000, 0x0000, 0x0000 } }, |
|
1468 |
{ 0x1E64, { 0x1E65, 0x0000, 0x0000, 0x0000 } }, |
|
1469 |
{ 0x1E66, { 0x1E67, 0x0000, 0x0000, 0x0000 } }, |
|
1470 |
{ 0x1E68, { 0x1E69, 0x0000, 0x0000, 0x0000 } }, |
|
1471 |
{ 0x1E6A, { 0x1E6B, 0x0000, 0x0000, 0x0000 } }, |
|
1472 |
{ 0x1E6C, { 0x1E6D, 0x0000, 0x0000, 0x0000 } }, |
|
1473 |
{ 0x1E6E, { 0x1E6F, 0x0000, 0x0000, 0x0000 } }, |
|
1474 |
{ 0x1E70, { 0x1E71, 0x0000, 0x0000, 0x0000 } }, |
|
1475 |
{ 0x1E72, { 0x1E73, 0x0000, 0x0000, 0x0000 } }, |
|
1476 |
{ 0x1E74, { 0x1E75, 0x0000, 0x0000, 0x0000 } }, |
|
1477 |
{ 0x1E76, { 0x1E77, 0x0000, 0x0000, 0x0000 } }, |
|
1478 |
{ 0x1E78, { 0x1E79, 0x0000, 0x0000, 0x0000 } }, |
|
1479 |
{ 0x1E7A, { 0x1E7B, 0x0000, 0x0000, 0x0000 } }, |
|
1480 |
{ 0x1E7C, { 0x1E7D, 0x0000, 0x0000, 0x0000 } }, |
|
1481 |
{ 0x1E7E, { 0x1E7F, 0x0000, 0x0000, 0x0000 } }, |
|
1482 |
{ 0x1E80, { 0x1E81, 0x0000, 0x0000, 0x0000 } }, |
|
1483 |
{ 0x1E82, { 0x1E83, 0x0000, 0x0000, 0x0000 } }, |
|
1484 |
{ 0x1E84, { 0x1E85, 0x0000, 0x0000, 0x0000 } }, |
|
1485 |
{ 0x1E86, { 0x1E87, 0x0000, 0x0000, 0x0000 } }, |
|
1486 |
{ 0x1E88, { 0x1E89, 0x0000, 0x0000, 0x0000 } }, |
|
1487 |
{ 0x1E8A, { 0x1E8B, 0x0000, 0x0000, 0x0000 } }, |
|
1488 |
{ 0x1E8C, { 0x1E8D, 0x0000, 0x0000, 0x0000 } }, |
|
1489 |
{ 0x1E8E, { 0x1E8F, 0x0000, 0x0000, 0x0000 } }, |
|
1490 |
{ 0x1E90, { 0x1E91, 0x0000, 0x0000, 0x0000 } }, |
|
1491 |
{ 0x1E92, { 0x1E93, 0x0000, 0x0000, 0x0000 } }, |
|
1492 |
{ 0x1E94, { 0x1E95, 0x0000, 0x0000, 0x0000 } }, |
|
1493 |
{ 0x1E96, { 0x0068, 0x0331, 0x0000, 0x0000 } }, |
|
1494 |
{ 0x1E97, { 0x0074, 0x0308, 0x0000, 0x0000 } }, |
|
1495 |
{ 0x1E98, { 0x0077, 0x030A, 0x0000, 0x0000 } }, |
|
1496 |
{ 0x1E99, { 0x0079, 0x030A, 0x0000, 0x0000 } }, |
|
1497 |
{ 0x1E9A, { 0x0061, 0x02BE, 0x0000, 0x0000 } }, |
|
1498 |
{ 0x1E9B, { 0x1E61, 0x0000, 0x0000, 0x0000 } }, |
|
1499 |
{ 0x1EA0, { 0x1EA1, 0x0000, 0x0000, 0x0000 } }, |
|
1500 |
{ 0x1EA2, { 0x1EA3, 0x0000, 0x0000, 0x0000 } }, |
|
1501 |
{ 0x1EA4, { 0x1EA5, 0x0000, 0x0000, 0x0000 } }, |
|
1502 |
{ 0x1EA6, { 0x1EA7, 0x0000, 0x0000, 0x0000 } }, |
|
1503 |
{ 0x1EA8, { 0x1EA9, 0x0000, 0x0000, 0x0000 } }, |
|
1504 |
{ 0x1EAA, { 0x1EAB, 0x0000, 0x0000, 0x0000 } }, |
|
1505 |
{ 0x1EAC, { 0x1EAD, 0x0000, 0x0000, 0x0000 } }, |
|
1506 |
{ 0x1EAE, { 0x1EAF, 0x0000, 0x0000, 0x0000 } }, |
|
1507 |
{ 0x1EB0, { 0x1EB1, 0x0000, 0x0000, 0x0000 } }, |
|
1508 |
{ 0x1EB2, { 0x1EB3, 0x0000, 0x0000, 0x0000 } }, |
|
1509 |
{ 0x1EB4, { 0x1EB5, 0x0000, 0x0000, 0x0000 } }, |
|
1510 |
{ 0x1EB6, { 0x1EB7, 0x0000, 0x0000, 0x0000 } }, |
|
1511 |
{ 0x1EB8, { 0x1EB9, 0x0000, 0x0000, 0x0000 } }, |
|
1512 |
{ 0x1EBA, { 0x1EBB, 0x0000, 0x0000, 0x0000 } }, |
|
1513 |
{ 0x1EBC, { 0x1EBD, 0x0000, 0x0000, 0x0000 } }, |
|
1514 |
{ 0x1EBE, { 0x1EBF, 0x0000, 0x0000, 0x0000 } }, |
|
1515 |
{ 0x1EC0, { 0x1EC1, 0x0000, 0x0000, 0x0000 } }, |
|
1516 |
{ 0x1EC2, { 0x1EC3, 0x0000, 0x0000, 0x0000 } }, |
|
1517 |
{ 0x1EC4, { 0x1EC5, 0x0000, 0x0000, 0x0000 } }, |
|
1518 |
{ 0x1EC6, { 0x1EC7, 0x0000, 0x0000, 0x0000 } }, |
|
1519 |
{ 0x1EC8, { 0x1EC9, 0x0000, 0x0000, 0x0000 } }, |
|
1520 |
{ 0x1ECA, { 0x1ECB, 0x0000, 0x0000, 0x0000 } }, |
|
1521 |
{ 0x1ECC, { 0x1ECD, 0x0000, 0x0000, 0x0000 } }, |
|
1522 |
{ 0x1ECE, { 0x1ECF, 0x0000, 0x0000, 0x0000 } }, |
|
1523 |
{ 0x1ED0, { 0x1ED1, 0x0000, 0x0000, 0x0000 } }, |
|
1524 |
{ 0x1ED2, { 0x1ED3, 0x0000, 0x0000, 0x0000 } }, |
|
1525 |
{ 0x1ED4, { 0x1ED5, 0x0000, 0x0000, 0x0000 } }, |
|
1526 |
{ 0x1ED6, { 0x1ED7, 0x0000, 0x0000, 0x0000 } }, |
|
1527 |
{ 0x1ED8, { 0x1ED9, 0x0000, 0x0000, 0x0000 } }, |
|
1528 |
{ 0x1EDA, { 0x1EDB, 0x0000, 0x0000, 0x0000 } }, |
|
1529 |
{ 0x1EDC, { 0x1EDD, 0x0000, 0x0000, 0x0000 } }, |
|
1530 |
{ 0x1EDE, { 0x1EDF, 0x0000, 0x0000, 0x0000 } }, |
|
1531 |
{ 0x1EE0, { 0x1EE1, 0x0000, 0x0000, 0x0000 } }, |
|
1532 |
{ 0x1EE2, { 0x1EE3, 0x0000, 0x0000, 0x0000 } }, |
|
1533 |
{ 0x1EE4, { 0x1EE5, 0x0000, 0x0000, 0x0000 } }, |
|
1534 |
{ 0x1EE6, { 0x1EE7, 0x0000, 0x0000, 0x0000 } }, |
|
1535 |
{ 0x1EE8, { 0x1EE9, 0x0000, 0x0000, 0x0000 } }, |
|
1536 |
{ 0x1EEA, { 0x1EEB, 0x0000, 0x0000, 0x0000 } }, |
|
1537 |
{ 0x1EEC, { 0x1EED, 0x0000, 0x0000, 0x0000 } }, |
|
1538 |
{ 0x1EEE, { 0x1EEF, 0x0000, 0x0000, 0x0000 } }, |
|
1539 |
{ 0x1EF0, { 0x1EF1, 0x0000, 0x0000, 0x0000 } }, |
|
1540 |
{ 0x1EF2, { 0x1EF3, 0x0000, 0x0000, 0x0000 } }, |
|
1541 |
{ 0x1EF4, { 0x1EF5, 0x0000, 0x0000, 0x0000 } }, |
|
1542 |
{ 0x1EF6, { 0x1EF7, 0x0000, 0x0000, 0x0000 } }, |
|
1543 |
{ 0x1EF8, { 0x1EF9, 0x0000, 0x0000, 0x0000 } }, |
|
1544 |
{ 0x1F08, { 0x1F00, 0x0000, 0x0000, 0x0000 } }, |
|
1545 |
{ 0x1F09, { 0x1F01, 0x0000, 0x0000, 0x0000 } }, |
|
1546 |
{ 0x1F0A, { 0x1F02, 0x0000, 0x0000, 0x0000 } }, |
|
1547 |
{ 0x1F0B, { 0x1F03, 0x0000, 0x0000, 0x0000 } }, |
|
1548 |
{ 0x1F0C, { 0x1F04, 0x0000, 0x0000, 0x0000 } }, |
|
1549 |
{ 0x1F0D, { 0x1F05, 0x0000, 0x0000, 0x0000 } }, |
|
1550 |
{ 0x1F0E, { 0x1F06, 0x0000, 0x0000, 0x0000 } }, |
|
1551 |
{ 0x1F0F, { 0x1F07, 0x0000, 0x0000, 0x0000 } }, |
|
1552 |
{ 0x1F18, { 0x1F10, 0x0000, 0x0000, 0x0000 } }, |
|
1553 |
{ 0x1F19, { 0x1F11, 0x0000, 0x0000, 0x0000 } }, |
|
1554 |
{ 0x1F1A, { 0x1F12, 0x0000, 0x0000, 0x0000 } }, |
|
1555 |
{ 0x1F1B, { 0x1F13, 0x0000, 0x0000, 0x0000 } }, |
|
1556 |
{ 0x1F1C, { 0x1F14, 0x0000, 0x0000, 0x0000 } }, |
|
1557 |
{ 0x1F1D, { 0x1F15, 0x0000, 0x0000, 0x0000 } }, |
|
1558 |
{ 0x1F28, { 0x1F20, 0x0000, 0x0000, 0x0000 } }, |
|
1559 |
{ 0x1F29, { 0x1F21, 0x0000, 0x0000, 0x0000 } }, |
|
1560 |
{ 0x1F2A, { 0x1F22, 0x0000, 0x0000, 0x0000 } }, |
|
1561 |
{ 0x1F2B, { 0x1F23, 0x0000, 0x0000, 0x0000 } }, |
|
1562 |
{ 0x1F2C, { 0x1F24, 0x0000, 0x0000, 0x0000 } }, |
|
1563 |
{ 0x1F2D, { 0x1F25, 0x0000, 0x0000, 0x0000 } }, |
|
1564 |
{ 0x1F2E, { 0x1F26, 0x0000, 0x0000, 0x0000 } }, |
|
1565 |
{ 0x1F2F, { 0x1F27, 0x0000, 0x0000, 0x0000 } }, |
|
1566 |
{ 0x1F38, { 0x1F30, 0x0000, 0x0000, 0x0000 } }, |
|
1567 |
{ 0x1F39, { 0x1F31, 0x0000, 0x0000, 0x0000 } }, |
|
1568 |
{ 0x1F3A, { 0x1F32, 0x0000, 0x0000, 0x0000 } }, |
|
1569 |
{ 0x1F3B, { 0x1F33, 0x0000, 0x0000, 0x0000 } }, |
|
1570 |
{ 0x1F3C, { 0x1F34, 0x0000, 0x0000, 0x0000 } }, |
|
1571 |
{ 0x1F3D, { 0x1F35, 0x0000, 0x0000, 0x0000 } }, |
|
1572 |
{ 0x1F3E, { 0x1F36, 0x0000, 0x0000, 0x0000 } }, |
|
1573 |
{ 0x1F3F, { 0x1F37, 0x0000, 0x0000, 0x0000 } }, |
|
1574 |
{ 0x1F48, { 0x1F40, 0x0000, 0x0000, 0x0000 } }, |
|
1575 |
{ 0x1F49, { 0x1F41, 0x0000, 0x0000, 0x0000 } }, |
|
1576 |
{ 0x1F4A, { 0x1F42, 0x0000, 0x0000, 0x0000 } }, |
|
1577 |
{ 0x1F4B, { 0x1F43, 0x0000, 0x0000, 0x0000 } }, |
|
1578 |
{ 0x1F4C, { 0x1F44, 0x0000, 0x0000, 0x0000 } }, |
|
1579 |
{ 0x1F4D, { 0x1F45, 0x0000, 0x0000, 0x0000 } }, |
|
1580 |
{ 0x1F50, { 0x03C5, 0x0313, 0x0000, 0x0000 } }, |
|
1581 |
{ 0x1F52, { 0x03C5, 0x0313, 0x0300, 0x0000 } }, |
|
1582 |
{ 0x1F54, { 0x03C5, 0x0313, 0x0301, 0x0000 } }, |
|
1583 |
{ 0x1F56, { 0x03C5, 0x0313, 0x0342, 0x0000 } }, |
|
1584 |
{ 0x1F59, { 0x1F51, 0x0000, 0x0000, 0x0000 } }, |
|
1585 |
{ 0x1F5B, { 0x1F53, 0x0000, 0x0000, 0x0000 } }, |
|
1586 |
{ 0x1F5D, { 0x1F55, 0x0000, 0x0000, 0x0000 } }, |
|
1587 |
{ 0x1F5F, { 0x1F57, 0x0000, 0x0000, 0x0000 } }, |
|
1588 |
{ 0x1F68, { 0x1F60, 0x0000, 0x0000, 0x0000 } }, |
|
1589 |
{ 0x1F69, { 0x1F61, 0x0000, 0x0000, 0x0000 } }, |
|
1590 |
{ 0x1F6A, { 0x1F62, 0x0000, 0x0000, 0x0000 } }, |
|
1591 |
{ 0x1F6B, { 0x1F63, 0x0000, 0x0000, 0x0000 } }, |
|
1592 |
{ 0x1F6C, { 0x1F64, 0x0000, 0x0000, 0x0000 } }, |
|
1593 |
{ 0x1F6D, { 0x1F65, 0x0000, 0x0000, 0x0000 } }, |
|
1594 |
{ 0x1F6E, { 0x1F66, 0x0000, 0x0000, 0x0000 } }, |
|
1595 |
{ 0x1F6F, { 0x1F67, 0x0000, 0x0000, 0x0000 } }, |
|
1596 |
{ 0x1F80, { 0x1F00, 0x03B9, 0x0000, 0x0000 } }, |
|
1597 |
{ 0x1F81, { 0x1F01, 0x03B9, 0x0000, 0x0000 } }, |
|
1598 |
{ 0x1F82, { 0x1F02, 0x03B9, 0x0000, 0x0000 } }, |
|
1599 |
{ 0x1F83, { 0x1F03, 0x03B9, 0x0000, 0x0000 } }, |
|
1600 |
{ 0x1F84, { 0x1F04, 0x03B9, 0x0000, 0x0000 } }, |
|
1601 |
{ 0x1F85, { 0x1F05, 0x03B9, 0x0000, 0x0000 } }, |
|
1602 |
{ 0x1F86, { 0x1F06, 0x03B9, 0x0000, 0x0000 } }, |
|
1603 |
{ 0x1F87, { 0x1F07, 0x03B9, 0x0000, 0x0000 } }, |
|
1604 |
{ 0x1F88, { 0x1F00, 0x03B9, 0x0000, 0x0000 } }, |
|
1605 |
{ 0x1F89, { 0x1F01, 0x03B9, 0x0000, 0x0000 } }, |
|
1606 |
{ 0x1F8A, { 0x1F02, 0x03B9, 0x0000, 0x0000 } }, |
|
1607 |
{ 0x1F8B, { 0x1F03, 0x03B9, 0x0000, 0x0000 } }, |
|
1608 |
{ 0x1F8C, { 0x1F04, 0x03B9, 0x0000, 0x0000 } }, |
|
1609 |
{ 0x1F8D, { 0x1F05, 0x03B9, 0x0000, 0x0000 } }, |
|
1610 |
{ 0x1F8E, { 0x1F06, 0x03B9, 0x0000, 0x0000 } }, |
|
1611 |
{ 0x1F8F, { 0x1F07, 0x03B9, 0x0000, 0x0000 } }, |
|
1612 |
{ 0x1F90, { 0x1F20, 0x03B9, 0x0000, 0x0000 } }, |
|
1613 |
{ 0x1F91, { 0x1F21, 0x03B9, 0x0000, 0x0000 } }, |
|
1614 |
{ 0x1F92, { 0x1F22, 0x03B9, 0x0000, 0x0000 } }, |
|
1615 |
{ 0x1F93, { 0x1F23, 0x03B9, 0x0000, 0x0000 } }, |
|
1616 |
{ 0x1F94, { 0x1F24, 0x03B9, 0x0000, 0x0000 } }, |
|
1617 |
{ 0x1F95, { 0x1F25, 0x03B9, 0x0000, 0x0000 } }, |
|
1618 |
{ 0x1F96, { 0x1F26, 0x03B9, 0x0000, 0x0000 } }, |
|
1619 |
{ 0x1F97, { 0x1F27, 0x03B9, 0x0000, 0x0000 } }, |
|
1620 |
{ 0x1F98, { 0x1F20, 0x03B9, 0x0000, 0x0000 } }, |
|
1621 |
{ 0x1F99, { 0x1F21, 0x03B9, 0x0000, 0x0000 } }, |
|
1622 |
{ 0x1F9A, { 0x1F22, 0x03B9, 0x0000, 0x0000 } }, |
|
1623 |
{ 0x1F9B, { 0x1F23, 0x03B9, 0x0000, 0x0000 } }, |
|
1624 |
{ 0x1F9C, { 0x1F24, 0x03B9, 0x0000, 0x0000 } }, |
|
1625 |
{ 0x1F9D, { 0x1F25, 0x03B9, 0x0000, 0x0000 } }, |
|
1626 |
{ 0x1F9E, { 0x1F26, 0x03B9, 0x0000, 0x0000 } }, |
|
1627 |
{ 0x1F9F, { 0x1F27, 0x03B9, 0x0000, 0x0000 } }, |
|
1628 |
{ 0x1FA0, { 0x1F60, 0x03B9, 0x0000, 0x0000 } }, |
|
1629 |
{ 0x1FA1, { 0x1F61, 0x03B9, 0x0000, 0x0000 } }, |
|
1630 |
{ 0x1FA2, { 0x1F62, 0x03B9, 0x0000, 0x0000 } }, |
|
1631 |
{ 0x1FA3, { 0x1F63, 0x03B9, 0x0000, 0x0000 } }, |
|
1632 |
{ 0x1FA4, { 0x1F64, 0x03B9, 0x0000, 0x0000 } }, |
|
1633 |
{ 0x1FA5, { 0x1F65, 0x03B9, 0x0000, 0x0000 } }, |
|
1634 |
{ 0x1FA6, { 0x1F66, 0x03B9, 0x0000, 0x0000 } }, |
|
1635 |
{ 0x1FA7, { 0x1F67, 0x03B9, 0x0000, 0x0000 } }, |
|
1636 |
{ 0x1FA8, { 0x1F60, 0x03B9, 0x0000, 0x0000 } }, |
|
1637 |
{ 0x1FA9, { 0x1F61, 0x03B9, 0x0000, 0x0000 } }, |
|
1638 |
{ 0x1FAA, { 0x1F62, 0x03B9, 0x0000, 0x0000 } }, |
|
1639 |
{ 0x1FAB, { 0x1F63, 0x03B9, 0x0000, 0x0000 } }, |
|
1640 |
{ 0x1FAC, { 0x1F64, 0x03B9, 0x0000, 0x0000 } }, |
|
1641 |
{ 0x1FAD, { 0x1F65, 0x03B9, 0x0000, 0x0000 } }, |
|
1642 |
{ 0x1FAE, { 0x1F66, 0x03B9, 0x0000, 0x0000 } }, |
|
1643 |
{ 0x1FAF, { 0x1F67, 0x03B9, 0x0000, 0x0000 } }, |
|
1644 |
{ 0x1FB2, { 0x1F70, 0x03B9, 0x0000, 0x0000 } }, |
|
1645 |
{ 0x1FB3, { 0x03B1, 0x03B9, 0x0000, 0x0000 } }, |
|
1646 |
{ 0x1FB4, { 0x03AC, 0x03B9, 0x0000, 0x0000 } }, |
|
1647 |
{ 0x1FB6, { 0x03B1, 0x0342, 0x0000, 0x0000 } }, |
|
1648 |
{ 0x1FB7, { 0x03B1, 0x0342, 0x03B9, 0x0000 } }, |
|
1649 |
{ 0x1FB8, { 0x1FB0, 0x0000, 0x0000, 0x0000 } }, |
|
1650 |
{ 0x1FB9, { 0x1FB1, 0x0000, 0x0000, 0x0000 } }, |
|
1651 |
{ 0x1FBA, { 0x1F70, 0x0000, 0x0000, 0x0000 } }, |
|
1652 |
{ 0x1FBB, { 0x1F71, 0x0000, 0x0000, 0x0000 } }, |
|
1653 |
{ 0x1FBC, { 0x03B1, 0x03B9, 0x0000, 0x0000 } }, |
|
1654 |
{ 0x1FBE, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
1655 |
{ 0x1FC2, { 0x1F74, 0x03B9, 0x0000, 0x0000 } }, |
|
1656 |
{ 0x1FC3, { 0x03B7, 0x03B9, 0x0000, 0x0000 } }, |
|
1657 |
{ 0x1FC4, { 0x03AE, 0x03B9, 0x0000, 0x0000 } }, |
|
1658 |
{ 0x1FC6, { 0x03B7, 0x0342, 0x0000, 0x0000 } }, |
|
1659 |
{ 0x1FC7, { 0x03B7, 0x0342, 0x03B9, 0x0000 } }, |
|
1660 |
{ 0x1FC8, { 0x1F72, 0x0000, 0x0000, 0x0000 } }, |
|
1661 |
{ 0x1FC9, { 0x1F73, 0x0000, 0x0000, 0x0000 } }, |
|
1662 |
{ 0x1FCA, { 0x1F74, 0x0000, 0x0000, 0x0000 } }, |
|
1663 |
{ 0x1FCB, { 0x1F75, 0x0000, 0x0000, 0x0000 } }, |
|
1664 |
{ 0x1FCC, { 0x03B7, 0x03B9, 0x0000, 0x0000 } }, |
|
1665 |
{ 0x1FD2, { 0x03B9, 0x0308, 0x0300, 0x0000 } }, |
|
1666 |
{ 0x1FD3, { 0x03B9, 0x0308, 0x0301, 0x0000 } }, |
|
1667 |
{ 0x1FD6, { 0x03B9, 0x0342, 0x0000, 0x0000 } }, |
|
1668 |
{ 0x1FD7, { 0x03B9, 0x0308, 0x0342, 0x0000 } }, |
|
1669 |
{ 0x1FD8, { 0x1FD0, 0x0000, 0x0000, 0x0000 } }, |
|
1670 |
{ 0x1FD9, { 0x1FD1, 0x0000, 0x0000, 0x0000 } }, |
|
1671 |
{ 0x1FDA, { 0x1F76, 0x0000, 0x0000, 0x0000 } }, |
|
1672 |
{ 0x1FDB, { 0x1F77, 0x0000, 0x0000, 0x0000 } }, |
|
1673 |
{ 0x1FE2, { 0x03C5, 0x0308, 0x0300, 0x0000 } }, |
|
1674 |
{ 0x1FE3, { 0x03C5, 0x0308, 0x0301, 0x0000 } }, |
|
1675 |
{ 0x1FE4, { 0x03C1, 0x0313, 0x0000, 0x0000 } }, |
|
1676 |
{ 0x1FE6, { 0x03C5, 0x0342, 0x0000, 0x0000 } }, |
|
1677 |
{ 0x1FE7, { 0x03C5, 0x0308, 0x0342, 0x0000 } }, |
|
1678 |
{ 0x1FE8, { 0x1FE0, 0x0000, 0x0000, 0x0000 } }, |
|
1679 |
{ 0x1FE9, { 0x1FE1, 0x0000, 0x0000, 0x0000 } }, |
|
1680 |
{ 0x1FEA, { 0x1F7A, 0x0000, 0x0000, 0x0000 } }, |
|
1681 |
{ 0x1FEB, { 0x1F7B, 0x0000, 0x0000, 0x0000 } }, |
|
1682 |
{ 0x1FEC, { 0x1FE5, 0x0000, 0x0000, 0x0000 } }, |
|
1683 |
{ 0x1FF2, { 0x1F7C, 0x03B9, 0x0000, 0x0000 } }, |
|
1684 |
{ 0x1FF3, { 0x03C9, 0x03B9, 0x0000, 0x0000 } }, |
|
1685 |
{ 0x1FF4, { 0x03CE, 0x03B9, 0x0000, 0x0000 } }, |
|
1686 |
{ 0x1FF6, { 0x03C9, 0x0342, 0x0000, 0x0000 } }, |
|
1687 |
{ 0x1FF7, { 0x03C9, 0x0342, 0x03B9, 0x0000 } }, |
|
1688 |
{ 0x1FF8, { 0x1F78, 0x0000, 0x0000, 0x0000 } }, |
|
1689 |
{ 0x1FF9, { 0x1F79, 0x0000, 0x0000, 0x0000 } }, |
|
1690 |
{ 0x1FFA, { 0x1F7C, 0x0000, 0x0000, 0x0000 } }, |
|
1691 |
{ 0x1FFB, { 0x1F7D, 0x0000, 0x0000, 0x0000 } }, |
|
1692 |
{ 0x1FFC, { 0x03C9, 0x03B9, 0x0000, 0x0000 } }, |
|
1693 |
{ 0x20A8, { 0x0072, 0x0073, 0x0000, 0x0000 } }, |
|
1694 |
{ 0x2102, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1695 |
{ 0x2103, { 0x00B0, 0x0063, 0x0000, 0x0000 } }, |
|
1696 |
{ 0x2107, { 0x025B, 0x0000, 0x0000, 0x0000 } }, |
|
1697 |
{ 0x2109, { 0x00B0, 0x0066, 0x0000, 0x0000 } }, |
|
1698 |
{ 0x210B, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
1699 |
{ 0x210C, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
1700 |
{ 0x210D, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
1701 |
{ 0x2110, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
1702 |
{ 0x2111, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
1703 |
{ 0x2112, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
1704 |
{ 0x2115, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
1705 |
{ 0x2116, { 0x006E, 0x006F, 0x0000, 0x0000 } }, |
|
1706 |
{ 0x2119, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
1707 |
{ 0x211A, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
1708 |
{ 0x211B, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
1709 |
{ 0x211C, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
1710 |
{ 0x211D, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
1711 |
{ 0x2120, { 0x0073, 0x006D, 0x0000, 0x0000 } }, |
|
1712 |
{ 0x2121, { 0x0074, 0x0065, 0x006C, 0x0000 } }, |
|
1713 |
{ 0x2122, { 0x0074, 0x006D, 0x0000, 0x0000 } }, |
|
1714 |
{ 0x2124, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
1715 |
{ 0x2126, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
1716 |
{ 0x2128, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
1717 |
{ 0x212A, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
1718 |
{ 0x212B, { 0x00E5, 0x0000, 0x0000, 0x0000 } }, |
|
1719 |
{ 0x212C, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
1720 |
{ 0x212D, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1721 |
{ 0x2130, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
1722 |
{ 0x2131, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
1723 |
{ 0x2133, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
1724 |
{ 0x213E, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
1725 |
{ 0x213F, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
1726 |
{ 0x2145, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
1727 |
{ 0x2160, { 0x2170, 0x0000, 0x0000, 0x0000 } }, |
|
1728 |
{ 0x2161, { 0x2171, 0x0000, 0x0000, 0x0000 } }, |
|
1729 |
{ 0x2162, { 0x2172, 0x0000, 0x0000, 0x0000 } }, |
|
1730 |
{ 0x2163, { 0x2173, 0x0000, 0x0000, 0x0000 } }, |
|
1731 |
{ 0x2164, { 0x2174, 0x0000, 0x0000, 0x0000 } }, |
|
1732 |
{ 0x2165, { 0x2175, 0x0000, 0x0000, 0x0000 } }, |
|
1733 |
{ 0x2166, { 0x2176, 0x0000, 0x0000, 0x0000 } }, |
|
1734 |
{ 0x2167, { 0x2177, 0x0000, 0x0000, 0x0000 } }, |
|
1735 |
{ 0x2168, { 0x2178, 0x0000, 0x0000, 0x0000 } }, |
|
1736 |
{ 0x2169, { 0x2179, 0x0000, 0x0000, 0x0000 } }, |
|
1737 |
{ 0x216A, { 0x217A, 0x0000, 0x0000, 0x0000 } }, |
|
1738 |
{ 0x216B, { 0x217B, 0x0000, 0x0000, 0x0000 } }, |
|
1739 |
{ 0x216C, { 0x217C, 0x0000, 0x0000, 0x0000 } }, |
|
1740 |
{ 0x216D, { 0x217D, 0x0000, 0x0000, 0x0000 } }, |
|
1741 |
{ 0x216E, { 0x217E, 0x0000, 0x0000, 0x0000 } }, |
|
1742 |
{ 0x216F, { 0x217F, 0x0000, 0x0000, 0x0000 } }, |
|
1743 |
{ 0x24B6, { 0x24D0, 0x0000, 0x0000, 0x0000 } }, |
|
1744 |
{ 0x24B7, { 0x24D1, 0x0000, 0x0000, 0x0000 } }, |
|
1745 |
{ 0x24B8, { 0x24D2, 0x0000, 0x0000, 0x0000 } }, |
|
1746 |
{ 0x24B9, { 0x24D3, 0x0000, 0x0000, 0x0000 } }, |
|
1747 |
{ 0x24BA, { 0x24D4, 0x0000, 0x0000, 0x0000 } }, |
|
1748 |
{ 0x24BB, { 0x24D5, 0x0000, 0x0000, 0x0000 } }, |
|
1749 |
{ 0x24BC, { 0x24D6, 0x0000, 0x0000, 0x0000 } }, |
|
1750 |
{ 0x24BD, { 0x24D7, 0x0000, 0x0000, 0x0000 } }, |
|
1751 |
{ 0x24BE, { 0x24D8, 0x0000, 0x0000, 0x0000 } }, |
|
1752 |
{ 0x24BF, { 0x24D9, 0x0000, 0x0000, 0x0000 } }, |
|
1753 |
{ 0x24C0, { 0x24DA, 0x0000, 0x0000, 0x0000 } }, |
|
1754 |
{ 0x24C1, { 0x24DB, 0x0000, 0x0000, 0x0000 } }, |
|
1755 |
{ 0x24C2, { 0x24DC, 0x0000, 0x0000, 0x0000 } }, |
|
1756 |
{ 0x24C3, { 0x24DD, 0x0000, 0x0000, 0x0000 } }, |
|
1757 |
{ 0x24C4, { 0x24DE, 0x0000, 0x0000, 0x0000 } }, |
|
1758 |
{ 0x24C5, { 0x24DF, 0x0000, 0x0000, 0x0000 } }, |
|
1759 |
{ 0x24C6, { 0x24E0, 0x0000, 0x0000, 0x0000 } }, |
|
1760 |
{ 0x24C7, { 0x24E1, 0x0000, 0x0000, 0x0000 } }, |
|
1761 |
{ 0x24C8, { 0x24E2, 0x0000, 0x0000, 0x0000 } }, |
|
1762 |
{ 0x24C9, { 0x24E3, 0x0000, 0x0000, 0x0000 } }, |
|
1763 |
{ 0x24CA, { 0x24E4, 0x0000, 0x0000, 0x0000 } }, |
|
1764 |
{ 0x24CB, { 0x24E5, 0x0000, 0x0000, 0x0000 } }, |
|
1765 |
{ 0x24CC, { 0x24E6, 0x0000, 0x0000, 0x0000 } }, |
|
1766 |
{ 0x24CD, { 0x24E7, 0x0000, 0x0000, 0x0000 } }, |
|
1767 |
{ 0x24CE, { 0x24E8, 0x0000, 0x0000, 0x0000 } }, |
|
1768 |
{ 0x24CF, { 0x24E9, 0x0000, 0x0000, 0x0000 } }, |
|
1769 |
{ 0x3371, { 0x0068, 0x0070, 0x0061, 0x0000 } }, |
|
1770 |
{ 0x3373, { 0x0061, 0x0075, 0x0000, 0x0000 } }, |
|
1771 |
{ 0x3375, { 0x006F, 0x0076, 0x0000, 0x0000 } }, |
|
1772 |
{ 0x3380, { 0x0070, 0x0061, 0x0000, 0x0000 } }, |
|
1773 |
{ 0x3381, { 0x006E, 0x0061, 0x0000, 0x0000 } }, |
|
1774 |
{ 0x3382, { 0x03BC, 0x0061, 0x0000, 0x0000 } }, |
|
1775 |
{ 0x3383, { 0x006D, 0x0061, 0x0000, 0x0000 } }, |
|
1776 |
{ 0x3384, { 0x006B, 0x0061, 0x0000, 0x0000 } }, |
|
1777 |
{ 0x3385, { 0x006B, 0x0062, 0x0000, 0x0000 } }, |
|
1778 |
{ 0x3386, { 0x006D, 0x0062, 0x0000, 0x0000 } }, |
|
1779 |
{ 0x3387, { 0x0067, 0x0062, 0x0000, 0x0000 } }, |
|
1780 |
{ 0x338A, { 0x0070, 0x0066, 0x0000, 0x0000 } }, |
|
1781 |
{ 0x338B, { 0x006E, 0x0066, 0x0000, 0x0000 } }, |
|
1782 |
{ 0x338C, { 0x03BC, 0x0066, 0x0000, 0x0000 } }, |
|
1783 |
{ 0x3390, { 0x0068, 0x007A, 0x0000, 0x0000 } }, |
|
1784 |
{ 0x3391, { 0x006B, 0x0068, 0x007A, 0x0000 } }, |
|
1785 |
{ 0x3392, { 0x006D, 0x0068, 0x007A, 0x0000 } }, |
|
1786 |
{ 0x3393, { 0x0067, 0x0068, 0x007A, 0x0000 } }, |
|
1787 |
{ 0x3394, { 0x0074, 0x0068, 0x007A, 0x0000 } }, |
|
1788 |
{ 0x33A9, { 0x0070, 0x0061, 0x0000, 0x0000 } }, |
|
1789 |
{ 0x33AA, { 0x006B, 0x0070, 0x0061, 0x0000 } }, |
|
1790 |
{ 0x33AB, { 0x006D, 0x0070, 0x0061, 0x0000 } }, |
|
1791 |
{ 0x33AC, { 0x0067, 0x0070, 0x0061, 0x0000 } }, |
|
1792 |
{ 0x33B4, { 0x0070, 0x0076, 0x0000, 0x0000 } }, |
|
1793 |
{ 0x33B5, { 0x006E, 0x0076, 0x0000, 0x0000 } }, |
|
1794 |
{ 0x33B6, { 0x03BC, 0x0076, 0x0000, 0x0000 } }, |
|
1795 |
{ 0x33B7, { 0x006D, 0x0076, 0x0000, 0x0000 } }, |
|
1796 |
{ 0x33B8, { 0x006B, 0x0076, 0x0000, 0x0000 } }, |
|
1797 |
{ 0x33B9, { 0x006D, 0x0076, 0x0000, 0x0000 } }, |
|
1798 |
{ 0x33BA, { 0x0070, 0x0077, 0x0000, 0x0000 } }, |
|
1799 |
{ 0x33BB, { 0x006E, 0x0077, 0x0000, 0x0000 } }, |
|
1800 |
{ 0x33BC, { 0x03BC, 0x0077, 0x0000, 0x0000 } }, |
|
1801 |
{ 0x33BD, { 0x006D, 0x0077, 0x0000, 0x0000 } }, |
|
1802 |
{ 0x33BE, { 0x006B, 0x0077, 0x0000, 0x0000 } }, |
|
1803 |
{ 0x33BF, { 0x006D, 0x0077, 0x0000, 0x0000 } }, |
|
1804 |
{ 0x33C0, { 0x006B, 0x03C9, 0x0000, 0x0000 } }, |
|
1805 |
{ 0x33C1, { 0x006D, 0x03C9, 0x0000, 0x0000 } }, |
|
1806 |
{ 0x33C3, { 0x0062, 0x0071, 0x0000, 0x0000 } }, |
|
1807 |
{ 0x33C6, { 0x0063, 0x2215, 0x006B, 0x0067 } }, |
|
1808 |
{ 0x33C7, { 0x0063, 0x006F, 0x002E, 0x0000 } }, |
|
1809 |
{ 0x33C8, { 0x0064, 0x0062, 0x0000, 0x0000 } }, |
|
1810 |
{ 0x33C9, { 0x0067, 0x0079, 0x0000, 0x0000 } }, |
|
1811 |
{ 0x33CB, { 0x0068, 0x0070, 0x0000, 0x0000 } }, |
|
1812 |
{ 0x33CD, { 0x006B, 0x006B, 0x0000, 0x0000 } }, |
|
1813 |
{ 0x33CE, { 0x006B, 0x006D, 0x0000, 0x0000 } }, |
|
1814 |
{ 0x33D7, { 0x0070, 0x0068, 0x0000, 0x0000 } }, |
|
1815 |
{ 0x33D9, { 0x0070, 0x0070, 0x006D, 0x0000 } }, |
|
1816 |
{ 0x33DA, { 0x0070, 0x0072, 0x0000, 0x0000 } }, |
|
1817 |
{ 0x33DC, { 0x0073, 0x0076, 0x0000, 0x0000 } }, |
|
1818 |
{ 0x33DD, { 0x0077, 0x0062, 0x0000, 0x0000 } }, |
|
1819 |
{ 0xFB00, { 0x0066, 0x0066, 0x0000, 0x0000 } }, |
|
1820 |
{ 0xFB01, { 0x0066, 0x0069, 0x0000, 0x0000 } }, |
|
1821 |
{ 0xFB02, { 0x0066, 0x006C, 0x0000, 0x0000 } }, |
|
1822 |
{ 0xFB03, { 0x0066, 0x0066, 0x0069, 0x0000 } }, |
|
1823 |
{ 0xFB04, { 0x0066, 0x0066, 0x006C, 0x0000 } }, |
|
1824 |
{ 0xFB05, { 0x0073, 0x0074, 0x0000, 0x0000 } }, |
|
1825 |
{ 0xFB06, { 0x0073, 0x0074, 0x0000, 0x0000 } }, |
|
1826 |
{ 0xFB13, { 0x0574, 0x0576, 0x0000, 0x0000 } }, |
|
1827 |
{ 0xFB14, { 0x0574, 0x0565, 0x0000, 0x0000 } }, |
|
1828 |
{ 0xFB15, { 0x0574, 0x056B, 0x0000, 0x0000 } }, |
|
1829 |
{ 0xFB16, { 0x057E, 0x0576, 0x0000, 0x0000 } }, |
|
1830 |
{ 0xFB17, { 0x0574, 0x056D, 0x0000, 0x0000 } }, |
|
1831 |
{ 0xFF21, { 0xFF41, 0x0000, 0x0000, 0x0000 } }, |
|
1832 |
{ 0xFF22, { 0xFF42, 0x0000, 0x0000, 0x0000 } }, |
|
1833 |
{ 0xFF23, { 0xFF43, 0x0000, 0x0000, 0x0000 } }, |
|
1834 |
{ 0xFF24, { 0xFF44, 0x0000, 0x0000, 0x0000 } }, |
|
1835 |
{ 0xFF25, { 0xFF45, 0x0000, 0x0000, 0x0000 } }, |
|
1836 |
{ 0xFF26, { 0xFF46, 0x0000, 0x0000, 0x0000 } }, |
|
1837 |
{ 0xFF27, { 0xFF47, 0x0000, 0x0000, 0x0000 } }, |
|
1838 |
{ 0xFF28, { 0xFF48, 0x0000, 0x0000, 0x0000 } }, |
|
1839 |
{ 0xFF29, { 0xFF49, 0x0000, 0x0000, 0x0000 } }, |
|
1840 |
{ 0xFF2A, { 0xFF4A, 0x0000, 0x0000, 0x0000 } }, |
|
1841 |
{ 0xFF2B, { 0xFF4B, 0x0000, 0x0000, 0x0000 } }, |
|
1842 |
{ 0xFF2C, { 0xFF4C, 0x0000, 0x0000, 0x0000 } }, |
|
1843 |
{ 0xFF2D, { 0xFF4D, 0x0000, 0x0000, 0x0000 } }, |
|
1844 |
{ 0xFF2E, { 0xFF4E, 0x0000, 0x0000, 0x0000 } }, |
|
1845 |
{ 0xFF2F, { 0xFF4F, 0x0000, 0x0000, 0x0000 } }, |
|
1846 |
{ 0xFF30, { 0xFF50, 0x0000, 0x0000, 0x0000 } }, |
|
1847 |
{ 0xFF31, { 0xFF51, 0x0000, 0x0000, 0x0000 } }, |
|
1848 |
{ 0xFF32, { 0xFF52, 0x0000, 0x0000, 0x0000 } }, |
|
1849 |
{ 0xFF33, { 0xFF53, 0x0000, 0x0000, 0x0000 } }, |
|
1850 |
{ 0xFF34, { 0xFF54, 0x0000, 0x0000, 0x0000 } }, |
|
1851 |
{ 0xFF35, { 0xFF55, 0x0000, 0x0000, 0x0000 } }, |
|
1852 |
{ 0xFF36, { 0xFF56, 0x0000, 0x0000, 0x0000 } }, |
|
1853 |
{ 0xFF37, { 0xFF57, 0x0000, 0x0000, 0x0000 } }, |
|
1854 |
{ 0xFF38, { 0xFF58, 0x0000, 0x0000, 0x0000 } }, |
|
1855 |
{ 0xFF39, { 0xFF59, 0x0000, 0x0000, 0x0000 } }, |
|
1856 |
{ 0xFF3A, { 0xFF5A, 0x0000, 0x0000, 0x0000 } }, |
|
1857 |
// ##### |
|
1858 |
/* { 0x10400, { 0x10428, 0x0000, 0x0000, 0x0000 } }, |
|
1859 |
{ 0x10401, { 0x10429, 0x0000, 0x0000, 0x0000 } }, |
|
1860 |
{ 0x10402, { 0x1042A, 0x0000, 0x0000, 0x0000 } }, |
|
1861 |
{ 0x10403, { 0x1042B, 0x0000, 0x0000, 0x0000 } }, |
|
1862 |
{ 0x10404, { 0x1042C, 0x0000, 0x0000, 0x0000 } }, |
|
1863 |
{ 0x10405, { 0x1042D, 0x0000, 0x0000, 0x0000 } }, |
|
1864 |
{ 0x10406, { 0x1042E, 0x0000, 0x0000, 0x0000 } }, |
|
1865 |
{ 0x10407, { 0x1042F, 0x0000, 0x0000, 0x0000 } }, |
|
1866 |
{ 0x10408, { 0x10430, 0x0000, 0x0000, 0x0000 } }, |
|
1867 |
{ 0x10409, { 0x10431, 0x0000, 0x0000, 0x0000 } }, |
|
1868 |
{ 0x1040A, { 0x10432, 0x0000, 0x0000, 0x0000 } }, |
|
1869 |
{ 0x1040B, { 0x10433, 0x0000, 0x0000, 0x0000 } }, |
|
1870 |
{ 0x1040C, { 0x10434, 0x0000, 0x0000, 0x0000 } }, |
|
1871 |
{ 0x1040D, { 0x10435, 0x0000, 0x0000, 0x0000 } }, |
|
1872 |
{ 0x1040E, { 0x10436, 0x0000, 0x0000, 0x0000 } }, |
|
1873 |
{ 0x1040F, { 0x10437, 0x0000, 0x0000, 0x0000 } }, |
|
1874 |
{ 0x10410, { 0x10438, 0x0000, 0x0000, 0x0000 } }, |
|
1875 |
{ 0x10411, { 0x10439, 0x0000, 0x0000, 0x0000 } }, |
|
1876 |
{ 0x10412, { 0x1043A, 0x0000, 0x0000, 0x0000 } }, |
|
1877 |
{ 0x10413, { 0x1043B, 0x0000, 0x0000, 0x0000 } }, |
|
1878 |
{ 0x10414, { 0x1043C, 0x0000, 0x0000, 0x0000 } }, |
|
1879 |
{ 0x10415, { 0x1043D, 0x0000, 0x0000, 0x0000 } }, |
|
1880 |
{ 0x10416, { 0x1043E, 0x0000, 0x0000, 0x0000 } }, |
|
1881 |
{ 0x10417, { 0x1043F, 0x0000, 0x0000, 0x0000 } }, |
|
1882 |
{ 0x10418, { 0x10440, 0x0000, 0x0000, 0x0000 } }, |
|
1883 |
{ 0x10419, { 0x10441, 0x0000, 0x0000, 0x0000 } }, |
|
1884 |
{ 0x1041A, { 0x10442, 0x0000, 0x0000, 0x0000 } }, |
|
1885 |
{ 0x1041B, { 0x10443, 0x0000, 0x0000, 0x0000 } }, |
|
1886 |
{ 0x1041C, { 0x10444, 0x0000, 0x0000, 0x0000 } }, |
|
1887 |
{ 0x1041D, { 0x10445, 0x0000, 0x0000, 0x0000 } }, |
|
1888 |
{ 0x1041E, { 0x10446, 0x0000, 0x0000, 0x0000 } }, |
|
1889 |
{ 0x1041F, { 0x10447, 0x0000, 0x0000, 0x0000 } }, |
|
1890 |
{ 0x10420, { 0x10448, 0x0000, 0x0000, 0x0000 } }, |
|
1891 |
{ 0x10421, { 0x10449, 0x0000, 0x0000, 0x0000 } }, |
|
1892 |
{ 0x10422, { 0x1044A, 0x0000, 0x0000, 0x0000 } }, |
|
1893 |
{ 0x10423, { 0x1044B, 0x0000, 0x0000, 0x0000 } }, |
|
1894 |
{ 0x10424, { 0x1044C, 0x0000, 0x0000, 0x0000 } }, |
|
1895 |
{ 0x10425, { 0x1044D, 0x0000, 0x0000, 0x0000 } },*/ |
|
1896 |
{ 0x1D400, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
1897 |
{ 0x1D401, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
1898 |
{ 0x1D402, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1899 |
{ 0x1D403, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
1900 |
{ 0x1D404, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
1901 |
{ 0x1D405, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
1902 |
{ 0x1D406, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
1903 |
{ 0x1D407, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
1904 |
{ 0x1D408, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
1905 |
{ 0x1D409, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
1906 |
{ 0x1D40A, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
1907 |
{ 0x1D40B, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
1908 |
{ 0x1D40C, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
1909 |
{ 0x1D40D, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
1910 |
{ 0x1D40E, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
1911 |
{ 0x1D40F, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
1912 |
{ 0x1D410, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
1913 |
{ 0x1D411, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
1914 |
{ 0x1D412, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
1915 |
{ 0x1D413, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
1916 |
{ 0x1D414, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
1917 |
{ 0x1D415, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
1918 |
{ 0x1D416, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
1919 |
{ 0x1D417, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
1920 |
{ 0x1D418, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
1921 |
{ 0x1D419, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
1922 |
{ 0x1D434, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
1923 |
{ 0x1D435, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
1924 |
{ 0x1D436, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1925 |
{ 0x1D437, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
1926 |
{ 0x1D438, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
1927 |
{ 0x1D439, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
1928 |
{ 0x1D43A, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
1929 |
{ 0x1D43B, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
1930 |
{ 0x1D43C, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
1931 |
{ 0x1D43D, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
1932 |
{ 0x1D43E, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
1933 |
{ 0x1D43F, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
1934 |
{ 0x1D440, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
1935 |
{ 0x1D441, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
1936 |
{ 0x1D442, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
1937 |
{ 0x1D443, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
1938 |
{ 0x1D444, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
1939 |
{ 0x1D445, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
1940 |
{ 0x1D446, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
1941 |
{ 0x1D447, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
1942 |
{ 0x1D448, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
1943 |
{ 0x1D449, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
1944 |
{ 0x1D44A, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
1945 |
{ 0x1D44B, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
1946 |
{ 0x1D44C, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
1947 |
{ 0x1D44D, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
1948 |
{ 0x1D468, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
1949 |
{ 0x1D469, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
1950 |
{ 0x1D46A, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1951 |
{ 0x1D46B, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
1952 |
{ 0x1D46C, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
1953 |
{ 0x1D46D, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
1954 |
{ 0x1D46E, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
1955 |
{ 0x1D46F, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
1956 |
{ 0x1D470, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
1957 |
{ 0x1D471, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
1958 |
{ 0x1D472, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
1959 |
{ 0x1D473, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
1960 |
{ 0x1D474, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
1961 |
{ 0x1D475, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
1962 |
{ 0x1D476, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
1963 |
{ 0x1D477, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
1964 |
{ 0x1D478, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
1965 |
{ 0x1D479, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
1966 |
{ 0x1D47A, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
1967 |
{ 0x1D47B, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
1968 |
{ 0x1D47C, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
1969 |
{ 0x1D47D, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
1970 |
{ 0x1D47E, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
1971 |
{ 0x1D47F, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
1972 |
{ 0x1D480, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
1973 |
{ 0x1D481, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
1974 |
{ 0x1D49C, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
1975 |
{ 0x1D49E, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1976 |
{ 0x1D49F, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
1977 |
{ 0x1D4A2, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
1978 |
{ 0x1D4A5, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
1979 |
{ 0x1D4A6, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
1980 |
{ 0x1D4A9, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
1981 |
{ 0x1D4AA, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
1982 |
{ 0x1D4AB, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
1983 |
{ 0x1D4AC, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
1984 |
{ 0x1D4AE, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
1985 |
{ 0x1D4AF, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
1986 |
{ 0x1D4B0, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
1987 |
{ 0x1D4B1, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
1988 |
{ 0x1D4B2, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
1989 |
{ 0x1D4B3, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
1990 |
{ 0x1D4B4, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
1991 |
{ 0x1D4B5, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
1992 |
{ 0x1D4D0, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
1993 |
{ 0x1D4D1, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
1994 |
{ 0x1D4D2, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
1995 |
{ 0x1D4D3, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
1996 |
{ 0x1D4D4, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
1997 |
{ 0x1D4D5, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
1998 |
{ 0x1D4D6, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
1999 |
{ 0x1D4D7, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2000 |
{ 0x1D4D8, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2001 |
{ 0x1D4D9, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2002 |
{ 0x1D4DA, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2003 |
{ 0x1D4DB, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2004 |
{ 0x1D4DC, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2005 |
{ 0x1D4DD, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2006 |
{ 0x1D4DE, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2007 |
{ 0x1D4DF, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2008 |
{ 0x1D4E0, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2009 |
{ 0x1D4E1, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2010 |
{ 0x1D4E2, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2011 |
{ 0x1D4E3, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2012 |
{ 0x1D4E4, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2013 |
{ 0x1D4E5, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2014 |
{ 0x1D4E6, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2015 |
{ 0x1D4E7, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2016 |
{ 0x1D4E8, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2017 |
{ 0x1D4E9, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2018 |
{ 0x1D504, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2019 |
{ 0x1D505, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2020 |
{ 0x1D507, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2021 |
{ 0x1D508, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2022 |
{ 0x1D509, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2023 |
{ 0x1D50A, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2024 |
{ 0x1D50D, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2025 |
{ 0x1D50E, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2026 |
{ 0x1D50F, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2027 |
{ 0x1D510, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2028 |
{ 0x1D511, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2029 |
{ 0x1D512, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2030 |
{ 0x1D513, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2031 |
{ 0x1D514, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2032 |
{ 0x1D516, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2033 |
{ 0x1D517, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2034 |
{ 0x1D518, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2035 |
{ 0x1D519, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2036 |
{ 0x1D51A, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2037 |
{ 0x1D51B, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2038 |
{ 0x1D51C, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2039 |
{ 0x1D538, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2040 |
{ 0x1D539, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2041 |
{ 0x1D53B, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2042 |
{ 0x1D53C, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2043 |
{ 0x1D53D, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2044 |
{ 0x1D53E, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2045 |
{ 0x1D540, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2046 |
{ 0x1D541, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2047 |
{ 0x1D542, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2048 |
{ 0x1D543, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2049 |
{ 0x1D544, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2050 |
{ 0x1D546, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2051 |
{ 0x1D54A, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2052 |
{ 0x1D54B, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2053 |
{ 0x1D54C, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2054 |
{ 0x1D54D, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2055 |
{ 0x1D54E, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2056 |
{ 0x1D54F, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2057 |
{ 0x1D550, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2058 |
{ 0x1D56C, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2059 |
{ 0x1D56D, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2060 |
{ 0x1D56E, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
2061 |
{ 0x1D56F, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2062 |
{ 0x1D570, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2063 |
{ 0x1D571, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2064 |
{ 0x1D572, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2065 |
{ 0x1D573, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2066 |
{ 0x1D574, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2067 |
{ 0x1D575, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2068 |
{ 0x1D576, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2069 |
{ 0x1D577, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2070 |
{ 0x1D578, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2071 |
{ 0x1D579, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2072 |
{ 0x1D57A, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2073 |
{ 0x1D57B, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2074 |
{ 0x1D57C, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2075 |
{ 0x1D57D, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2076 |
{ 0x1D57E, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2077 |
{ 0x1D57F, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2078 |
{ 0x1D580, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2079 |
{ 0x1D581, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2080 |
{ 0x1D582, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2081 |
{ 0x1D583, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2082 |
{ 0x1D584, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2083 |
{ 0x1D585, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2084 |
{ 0x1D5A0, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2085 |
{ 0x1D5A1, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2086 |
{ 0x1D5A2, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
2087 |
{ 0x1D5A3, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2088 |
{ 0x1D5A4, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2089 |
{ 0x1D5A5, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2090 |
{ 0x1D5A6, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2091 |
{ 0x1D5A7, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2092 |
{ 0x1D5A8, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2093 |
{ 0x1D5A9, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2094 |
{ 0x1D5AA, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2095 |
{ 0x1D5AB, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2096 |
{ 0x1D5AC, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2097 |
{ 0x1D5AD, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2098 |
{ 0x1D5AE, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2099 |
{ 0x1D5AF, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2100 |
{ 0x1D5B0, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2101 |
{ 0x1D5B1, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2102 |
{ 0x1D5B2, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2103 |
{ 0x1D5B3, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2104 |
{ 0x1D5B4, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2105 |
{ 0x1D5B5, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2106 |
{ 0x1D5B6, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2107 |
{ 0x1D5B7, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2108 |
{ 0x1D5B8, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2109 |
{ 0x1D5B9, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2110 |
{ 0x1D5D4, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2111 |
{ 0x1D5D5, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2112 |
{ 0x1D5D6, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
2113 |
{ 0x1D5D7, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2114 |
{ 0x1D5D8, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2115 |
{ 0x1D5D9, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2116 |
{ 0x1D5DA, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2117 |
{ 0x1D5DB, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2118 |
{ 0x1D5DC, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2119 |
{ 0x1D5DD, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2120 |
{ 0x1D5DE, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2121 |
{ 0x1D5DF, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2122 |
{ 0x1D5E0, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2123 |
{ 0x1D5E1, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2124 |
{ 0x1D5E2, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2125 |
{ 0x1D5E3, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2126 |
{ 0x1D5E4, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2127 |
{ 0x1D5E5, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2128 |
{ 0x1D5E6, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2129 |
{ 0x1D5E7, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2130 |
{ 0x1D5E8, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2131 |
{ 0x1D5E9, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2132 |
{ 0x1D5EA, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2133 |
{ 0x1D5EB, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2134 |
{ 0x1D5EC, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2135 |
{ 0x1D5ED, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2136 |
{ 0x1D608, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2137 |
{ 0x1D609, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2138 |
{ 0x1D60A, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
2139 |
{ 0x1D60B, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2140 |
{ 0x1D60C, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2141 |
{ 0x1D60D, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2142 |
{ 0x1D60E, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2143 |
{ 0x1D60F, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2144 |
{ 0x1D610, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2145 |
{ 0x1D611, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2146 |
{ 0x1D612, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2147 |
{ 0x1D613, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2148 |
{ 0x1D614, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2149 |
{ 0x1D615, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2150 |
{ 0x1D616, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2151 |
{ 0x1D617, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2152 |
{ 0x1D618, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2153 |
{ 0x1D619, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2154 |
{ 0x1D61A, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2155 |
{ 0x1D61B, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2156 |
{ 0x1D61C, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2157 |
{ 0x1D61D, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2158 |
{ 0x1D61E, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2159 |
{ 0x1D61F, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2160 |
{ 0x1D620, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2161 |
{ 0x1D621, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2162 |
{ 0x1D63C, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2163 |
{ 0x1D63D, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2164 |
{ 0x1D63E, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
2165 |
{ 0x1D63F, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2166 |
{ 0x1D640, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2167 |
{ 0x1D641, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2168 |
{ 0x1D642, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2169 |
{ 0x1D643, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2170 |
{ 0x1D644, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2171 |
{ 0x1D645, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2172 |
{ 0x1D646, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2173 |
{ 0x1D647, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2174 |
{ 0x1D648, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2175 |
{ 0x1D649, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2176 |
{ 0x1D64A, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2177 |
{ 0x1D64B, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2178 |
{ 0x1D64C, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2179 |
{ 0x1D64D, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2180 |
{ 0x1D64E, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2181 |
{ 0x1D64F, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2182 |
{ 0x1D650, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2183 |
{ 0x1D651, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2184 |
{ 0x1D652, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2185 |
{ 0x1D653, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2186 |
{ 0x1D654, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2187 |
{ 0x1D655, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2188 |
{ 0x1D670, { 0x0061, 0x0000, 0x0000, 0x0000 } }, |
|
2189 |
{ 0x1D671, { 0x0062, 0x0000, 0x0000, 0x0000 } }, |
|
2190 |
{ 0x1D672, { 0x0063, 0x0000, 0x0000, 0x0000 } }, |
|
2191 |
{ 0x1D673, { 0x0064, 0x0000, 0x0000, 0x0000 } }, |
|
2192 |
{ 0x1D674, { 0x0065, 0x0000, 0x0000, 0x0000 } }, |
|
2193 |
{ 0x1D675, { 0x0066, 0x0000, 0x0000, 0x0000 } }, |
|
2194 |
{ 0x1D676, { 0x0067, 0x0000, 0x0000, 0x0000 } }, |
|
2195 |
{ 0x1D677, { 0x0068, 0x0000, 0x0000, 0x0000 } }, |
|
2196 |
{ 0x1D678, { 0x0069, 0x0000, 0x0000, 0x0000 } }, |
|
2197 |
{ 0x1D679, { 0x006A, 0x0000, 0x0000, 0x0000 } }, |
|
2198 |
{ 0x1D67A, { 0x006B, 0x0000, 0x0000, 0x0000 } }, |
|
2199 |
{ 0x1D67B, { 0x006C, 0x0000, 0x0000, 0x0000 } }, |
|
2200 |
{ 0x1D67C, { 0x006D, 0x0000, 0x0000, 0x0000 } }, |
|
2201 |
{ 0x1D67D, { 0x006E, 0x0000, 0x0000, 0x0000 } }, |
|
2202 |
{ 0x1D67E, { 0x006F, 0x0000, 0x0000, 0x0000 } }, |
|
2203 |
{ 0x1D67F, { 0x0070, 0x0000, 0x0000, 0x0000 } }, |
|
2204 |
{ 0x1D680, { 0x0071, 0x0000, 0x0000, 0x0000 } }, |
|
2205 |
{ 0x1D681, { 0x0072, 0x0000, 0x0000, 0x0000 } }, |
|
2206 |
{ 0x1D682, { 0x0073, 0x0000, 0x0000, 0x0000 } }, |
|
2207 |
{ 0x1D683, { 0x0074, 0x0000, 0x0000, 0x0000 } }, |
|
2208 |
{ 0x1D684, { 0x0075, 0x0000, 0x0000, 0x0000 } }, |
|
2209 |
{ 0x1D685, { 0x0076, 0x0000, 0x0000, 0x0000 } }, |
|
2210 |
{ 0x1D686, { 0x0077, 0x0000, 0x0000, 0x0000 } }, |
|
2211 |
{ 0x1D687, { 0x0078, 0x0000, 0x0000, 0x0000 } }, |
|
2212 |
{ 0x1D688, { 0x0079, 0x0000, 0x0000, 0x0000 } }, |
|
2213 |
{ 0x1D689, { 0x007A, 0x0000, 0x0000, 0x0000 } }, |
|
2214 |
{ 0x1D6A8, { 0x03B1, 0x0000, 0x0000, 0x0000 } }, |
|
2215 |
{ 0x1D6A9, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
2216 |
{ 0x1D6AA, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
2217 |
{ 0x1D6AB, { 0x03B4, 0x0000, 0x0000, 0x0000 } }, |
|
2218 |
{ 0x1D6AC, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
2219 |
{ 0x1D6AD, { 0x03B6, 0x0000, 0x0000, 0x0000 } }, |
|
2220 |
{ 0x1D6AE, { 0x03B7, 0x0000, 0x0000, 0x0000 } }, |
|
2221 |
{ 0x1D6AF, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2222 |
{ 0x1D6B0, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
2223 |
{ 0x1D6B1, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
2224 |
{ 0x1D6B2, { 0x03BB, 0x0000, 0x0000, 0x0000 } }, |
|
2225 |
{ 0x1D6B3, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
2226 |
{ 0x1D6B4, { 0x03BD, 0x0000, 0x0000, 0x0000 } }, |
|
2227 |
{ 0x1D6B5, { 0x03BE, 0x0000, 0x0000, 0x0000 } }, |
|
2228 |
{ 0x1D6B6, { 0x03BF, 0x0000, 0x0000, 0x0000 } }, |
|
2229 |
{ 0x1D6B7, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
2230 |
{ 0x1D6B8, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
2231 |
{ 0x1D6B9, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2232 |
{ 0x1D6BA, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2233 |
{ 0x1D6BB, { 0x03C4, 0x0000, 0x0000, 0x0000 } }, |
|
2234 |
{ 0x1D6BC, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
2235 |
{ 0x1D6BD, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
2236 |
{ 0x1D6BE, { 0x03C7, 0x0000, 0x0000, 0x0000 } }, |
|
2237 |
{ 0x1D6BF, { 0x03C8, 0x0000, 0x0000, 0x0000 } }, |
|
2238 |
{ 0x1D6C0, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
2239 |
{ 0x1D6D3, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2240 |
{ 0x1D6E2, { 0x03B1, 0x0000, 0x0000, 0x0000 } }, |
|
2241 |
{ 0x1D6E3, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
2242 |
{ 0x1D6E4, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
2243 |
{ 0x1D6E5, { 0x03B4, 0x0000, 0x0000, 0x0000 } }, |
|
2244 |
{ 0x1D6E6, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
2245 |
{ 0x1D6E7, { 0x03B6, 0x0000, 0x0000, 0x0000 } }, |
|
2246 |
{ 0x1D6E8, { 0x03B7, 0x0000, 0x0000, 0x0000 } }, |
|
2247 |
{ 0x1D6E9, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2248 |
{ 0x1D6EA, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
2249 |
{ 0x1D6EB, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
2250 |
{ 0x1D6EC, { 0x03BB, 0x0000, 0x0000, 0x0000 } }, |
|
2251 |
{ 0x1D6ED, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
2252 |
{ 0x1D6EE, { 0x03BD, 0x0000, 0x0000, 0x0000 } }, |
|
2253 |
{ 0x1D6EF, { 0x03BE, 0x0000, 0x0000, 0x0000 } }, |
|
2254 |
{ 0x1D6F0, { 0x03BF, 0x0000, 0x0000, 0x0000 } }, |
|
2255 |
{ 0x1D6F1, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
2256 |
{ 0x1D6F2, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
2257 |
{ 0x1D6F3, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2258 |
{ 0x1D6F4, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2259 |
{ 0x1D6F5, { 0x03C4, 0x0000, 0x0000, 0x0000 } }, |
|
2260 |
{ 0x1D6F6, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
2261 |
{ 0x1D6F7, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
2262 |
{ 0x1D6F8, { 0x03C7, 0x0000, 0x0000, 0x0000 } }, |
|
2263 |
{ 0x1D6F9, { 0x03C8, 0x0000, 0x0000, 0x0000 } }, |
|
2264 |
{ 0x1D6FA, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
2265 |
{ 0x1D70D, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2266 |
{ 0x1D71C, { 0x03B1, 0x0000, 0x0000, 0x0000 } }, |
|
2267 |
{ 0x1D71D, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
2268 |
{ 0x1D71E, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
2269 |
{ 0x1D71F, { 0x03B4, 0x0000, 0x0000, 0x0000 } }, |
|
2270 |
{ 0x1D720, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
2271 |
{ 0x1D721, { 0x03B6, 0x0000, 0x0000, 0x0000 } }, |
|
2272 |
{ 0x1D722, { 0x03B7, 0x0000, 0x0000, 0x0000 } }, |
|
2273 |
{ 0x1D723, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2274 |
{ 0x1D724, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
2275 |
{ 0x1D725, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
2276 |
{ 0x1D726, { 0x03BB, 0x0000, 0x0000, 0x0000 } }, |
|
2277 |
{ 0x1D727, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
2278 |
{ 0x1D728, { 0x03BD, 0x0000, 0x0000, 0x0000 } }, |
|
2279 |
{ 0x1D729, { 0x03BE, 0x0000, 0x0000, 0x0000 } }, |
|
2280 |
{ 0x1D72A, { 0x03BF, 0x0000, 0x0000, 0x0000 } }, |
|
2281 |
{ 0x1D72B, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
2282 |
{ 0x1D72C, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
2283 |
{ 0x1D72D, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2284 |
{ 0x1D72E, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2285 |
{ 0x1D72F, { 0x03C4, 0x0000, 0x0000, 0x0000 } }, |
|
2286 |
{ 0x1D730, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
2287 |
{ 0x1D731, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
2288 |
{ 0x1D732, { 0x03C7, 0x0000, 0x0000, 0x0000 } }, |
|
2289 |
{ 0x1D733, { 0x03C8, 0x0000, 0x0000, 0x0000 } }, |
|
2290 |
{ 0x1D734, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
2291 |
{ 0x1D747, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2292 |
{ 0x1D756, { 0x03B1, 0x0000, 0x0000, 0x0000 } }, |
|
2293 |
{ 0x1D757, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
2294 |
{ 0x1D758, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
2295 |
{ 0x1D759, { 0x03B4, 0x0000, 0x0000, 0x0000 } }, |
|
2296 |
{ 0x1D75A, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
2297 |
{ 0x1D75B, { 0x03B6, 0x0000, 0x0000, 0x0000 } }, |
|
2298 |
{ 0x1D75C, { 0x03B7, 0x0000, 0x0000, 0x0000 } }, |
|
2299 |
{ 0x1D75D, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2300 |
{ 0x1D75E, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
2301 |
{ 0x1D75F, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
2302 |
{ 0x1D760, { 0x03BB, 0x0000, 0x0000, 0x0000 } }, |
|
2303 |
{ 0x1D761, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
2304 |
{ 0x1D762, { 0x03BD, 0x0000, 0x0000, 0x0000 } }, |
|
2305 |
{ 0x1D763, { 0x03BE, 0x0000, 0x0000, 0x0000 } }, |
|
2306 |
{ 0x1D764, { 0x03BF, 0x0000, 0x0000, 0x0000 } }, |
|
2307 |
{ 0x1D765, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
2308 |
{ 0x1D766, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
2309 |
{ 0x1D767, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2310 |
{ 0x1D768, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2311 |
{ 0x1D769, { 0x03C4, 0x0000, 0x0000, 0x0000 } }, |
|
2312 |
{ 0x1D76A, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
2313 |
{ 0x1D76B, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
2314 |
{ 0x1D76C, { 0x03C7, 0x0000, 0x0000, 0x0000 } }, |
|
2315 |
{ 0x1D76D, { 0x03C8, 0x0000, 0x0000, 0x0000 } }, |
|
2316 |
{ 0x1D76E, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
2317 |
{ 0x1D781, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2318 |
{ 0x1D790, { 0x03B1, 0x0000, 0x0000, 0x0000 } }, |
|
2319 |
{ 0x1D791, { 0x03B2, 0x0000, 0x0000, 0x0000 } }, |
|
2320 |
{ 0x1D792, { 0x03B3, 0x0000, 0x0000, 0x0000 } }, |
|
2321 |
{ 0x1D793, { 0x03B4, 0x0000, 0x0000, 0x0000 } }, |
|
2322 |
{ 0x1D794, { 0x03B5, 0x0000, 0x0000, 0x0000 } }, |
|
2323 |
{ 0x1D795, { 0x03B6, 0x0000, 0x0000, 0x0000 } }, |
|
2324 |
{ 0x1D796, { 0x03B7, 0x0000, 0x0000, 0x0000 } }, |
|
2325 |
{ 0x1D797, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2326 |
{ 0x1D798, { 0x03B9, 0x0000, 0x0000, 0x0000 } }, |
|
2327 |
{ 0x1D799, { 0x03BA, 0x0000, 0x0000, 0x0000 } }, |
|
2328 |
{ 0x1D79A, { 0x03BB, 0x0000, 0x0000, 0x0000 } }, |
|
2329 |
{ 0x1D79B, { 0x03BC, 0x0000, 0x0000, 0x0000 } }, |
|
2330 |
{ 0x1D79C, { 0x03BD, 0x0000, 0x0000, 0x0000 } }, |
|
2331 |
{ 0x1D79D, { 0x03BE, 0x0000, 0x0000, 0x0000 } }, |
|
2332 |
{ 0x1D79E, { 0x03BF, 0x0000, 0x0000, 0x0000 } }, |
|
2333 |
{ 0x1D79F, { 0x03C0, 0x0000, 0x0000, 0x0000 } }, |
|
2334 |
{ 0x1D7A0, { 0x03C1, 0x0000, 0x0000, 0x0000 } }, |
|
2335 |
{ 0x1D7A1, { 0x03B8, 0x0000, 0x0000, 0x0000 } }, |
|
2336 |
{ 0x1D7A2, { 0x03C3, 0x0000, 0x0000, 0x0000 } }, |
|
2337 |
{ 0x1D7A3, { 0x03C4, 0x0000, 0x0000, 0x0000 } }, |
|
2338 |
{ 0x1D7A4, { 0x03C5, 0x0000, 0x0000, 0x0000 } }, |
|
2339 |
{ 0x1D7A5, { 0x03C6, 0x0000, 0x0000, 0x0000 } }, |
|
2340 |
{ 0x1D7A6, { 0x03C7, 0x0000, 0x0000, 0x0000 } }, |
|
2341 |
{ 0x1D7A7, { 0x03C8, 0x0000, 0x0000, 0x0000 } }, |
|
2342 |
{ 0x1D7A8, { 0x03C9, 0x0000, 0x0000, 0x0000 } }, |
|
2343 |
{ 0x1D7BB, { 0x03C3, 0x0000, 0x0000, 0x0000 } } |
|
2344 |
}; |
|
2345 |
||
2346 |
static void mapToLowerCase(QString *str, int from) |
|
2347 |
{ |
|
2348 |
int N = sizeof(NameprepCaseFolding) / sizeof(NameprepCaseFolding[0]); |
|
2349 |
||
2350 |
QChar *d = 0; |
|
2351 |
for (int i = from; i < str->size(); ++i) { |
|
2352 |
int uc = str->at(i).unicode(); |
|
2353 |
if (uc < 0x80) { |
|
2354 |
if (uc <= 'Z' && uc >= 'A') { |
|
2355 |
uc |= 0x20; |
|
2356 |
if (!d) |
|
2357 |
d = str->data(); |
|
2358 |
d[i] = QChar(uc); |
|
2359 |
} |
|
2360 |
} else { |
|
2361 |
const NameprepCaseFoldingEntry *entry = qBinaryFind(NameprepCaseFolding, |
|
2362 |
NameprepCaseFolding + N, |
|
2363 |
uc); |
|
2364 |
if ((entry - NameprepCaseFolding) != N) { |
|
2365 |
int l = 1; |
|
2366 |
while (l < 4 && entry->mapping[l]) |
|
2367 |
++l; |
|
2368 |
if (l > 1) { |
|
2369 |
str->replace(i, 1, (const QChar *)&entry->mapping[0], l); |
|
2370 |
d = 0; |
|
2371 |
} else { |
|
2372 |
if (!d) |
|
2373 |
d = str->data(); |
|
2374 |
d[i] = QChar(entry->mapping[0]); |
|
2375 |
} |
|
2376 |
} |
|
2377 |
} |
|
2378 |
} |
|
2379 |
} |
|
2380 |
||
2381 |
static bool isMappedToNothing(const QChar &ch) |
|
2382 |
{ |
|
2383 |
if (ch.unicode() < 0xad) |
|
2384 |
return false; |
|
2385 |
switch (ch.unicode()) { |
|
2386 |
case 0x00AD: case 0x034F: case 0x1806: case 0x180B: case 0x180C: case 0x180D: |
|
2387 |
case 0x200B: case 0x200C: case 0x200D: case 0x2060: case 0xFE00: case 0xFE01: |
|
2388 |
case 0xFE02: case 0xFE03: case 0xFE04: case 0xFE05: case 0xFE06: case 0xFE07: |
|
2389 |
case 0xFE08: case 0xFE09: case 0xFE0A: case 0xFE0B: case 0xFE0C: case 0xFE0D: |
|
2390 |
case 0xFE0E: case 0xFE0F: case 0xFEFF: |
|
2391 |
return true; |
|
2392 |
default: |
|
2393 |
return false; |
|
2394 |
} |
|
2395 |
} |
|
2396 |
||
2397 |
||
2398 |
static void stripProhibitedOutput(QString *str, int from) |
|
2399 |
{ |
|
2400 |
ushort *out = (ushort *)str->data() + from; |
|
2401 |
const ushort *in = out; |
|
2402 |
const ushort *end = (ushort *)str->data() + str->size(); |
|
2403 |
while (in < end) { |
|
2404 |
ushort uc = *in; |
|
2405 |
if (uc < 0x80 || |
|
2406 |
!(uc <= 0x009F |
|
2407 |
|| uc == 0x00A0 |
|
2408 |
|| uc == 0x0340 |
|
2409 |
|| uc == 0x0341 |
|
2410 |
|| uc == 0x06DD |
|
2411 |
|| uc == 0x070F |
|
2412 |
|| uc == 0x1680 |
|
2413 |
|| uc == 0x180E |
|
2414 |
|| (uc >= 0x2000 && uc <= 0x200B) |
|
2415 |
|| uc == 0x200C |
|
2416 |
|| uc == 0x200D |
|
2417 |
|| uc == 0x200E |
|
2418 |
|| uc == 0x200F |
|
2419 |
|| (uc >= 0x2028 && uc <= 0x202F) |
|
2420 |
|| uc == 0x205F |
|
2421 |
|| (uc >= 0x2060 && uc <= 0x2063) |
|
2422 |
|| uc == 0x206A |
|
2423 |
|| (uc >= 0x206A && uc <= 0x206F) |
|
2424 |
|| (uc >= 0x2FF0 && uc <= 0x2FFB) |
|
2425 |
|| uc == 0x3000 |
|
2426 |
|| (uc >= 0xD800 && uc <= 0xDFFF) |
|
2427 |
|| (uc >= 0xE000 && uc <= 0xF8FF) |
|
2428 |
|| (uc >= 0xFDD0 && uc <= 0xFDEF) |
|
2429 |
|| uc == 0xFEFF |
|
2430 |
|| (uc >= 0xFFF9 && uc <= 0xFFFC) |
|
2431 |
|| (uc >= 0xFFFA && (uc <= 0xFFFE || uc == 0xFFFF)) |
|
2432 |
/* ### Add NAMEPREP support for surrogates |
|
2433 |
|| uc == 0xE0001 |
|
2434 |
|| (uc >= 0x2FFFE && uc <= 0x2FFFF) |
|
2435 |
|| (uc >= 0x1D173 && uc <= 0x1D17A) |
|
2436 |
|| (uc >= 0x1FFFE && uc <= 0x1FFFF) |
|
2437 |
|| (uc >= 0x3FFFE && uc <= 0x3FFFF) |
|
2438 |
|| (uc >= 0x4FFFE && uc <= 0x4FFFF) |
|
2439 |
|| (uc >= 0x5FFFE && uc <= 0x5FFFF) |
|
2440 |
|| (uc >= 0x6FFFE && uc <= 0x6FFFF) |
|
2441 |
|| (uc >= 0x7FFFE && uc <= 0x7FFFF) |
|
2442 |
|| (uc >= 0x8FFFE && uc <= 0x8FFFF) |
|
2443 |
|| (uc >= 0x9FFFE && uc <= 0x9FFFF) |
|
2444 |
|| (uc >= 0xAFFFE && uc <= 0xAFFFF) |
|
2445 |
|| (uc >= 0xBFFFE && uc <= 0xBFFFF) |
|
2446 |
|| (uc >= 0xCFFFE && uc <= 0xCFFFF) |
|
2447 |
|| (uc >= 0xDFFFE && uc <= 0xDFFFF) |
|
2448 |
|| (uc >= 0xE0020 && uc <= 0xE007F) |
|
2449 |
|| (uc >= 0xEFFFE && uc <= 0xEFFFF) |
|
2450 |
|| (uc >= 0xF0000 && uc <= 0xFFFFD) |
|
2451 |
|| (uc >= 0xFFFFE && uc <= 0xFFFFF) |
|
2452 |
|| (uc >= 0x100000 && uc <= 0x10FFFD) |
|
2453 |
|| (uc >= 0x10FFFE && uc <= 0x10FFFF)*/)) |
|
2454 |
*out++ = *in; |
|
2455 |
++in; |
|
2456 |
} |
|
2457 |
if (in != out) |
|
2458 |
str->truncate(out - str->utf16()); |
|
2459 |
} |
|
2460 |
||
2461 |
static bool isBidirectionalRorAL(const QChar &c) |
|
2462 |
{ |
|
2463 |
ushort uc = c.unicode(); |
|
2464 |
if (uc < 0x5b0) |
|
2465 |
return false; |
|
2466 |
return uc == 0x05BE |
|
2467 |
|| uc == 0x05C0 |
|
2468 |
|| uc == 0x05C3 |
|
2469 |
|| (uc >= 0x05D0 && uc <= 0x05EA) |
|
2470 |
|| (uc >= 0x05F0 && uc <= 0x05F4) |
|
2471 |
|| uc == 0x061B |
|
2472 |
|| uc == 0x061F |
|
2473 |
|| (uc >= 0x0621 && uc <= 0x063A) |
|
2474 |
|| (uc >= 0x0640 && uc <= 0x064A) |
|
2475 |
|| (uc >= 0x066D && uc <= 0x066F) |
|
2476 |
|| (uc >= 0x0671 && uc <= 0x06D5) |
|
2477 |
|| uc == 0x06DD |
|
2478 |
|| (uc >= 0x06E5 && uc <= 0x06E6) |
|
2479 |
|| (uc >= 0x06FA && uc <= 0x06FE) |
|
2480 |
|| (uc >= 0x0700 && uc <= 0x070D) |
|
2481 |
|| uc == 0x0710 |
|
2482 |
|| (uc >= 0x0712 && uc <= 0x072C) |
|
2483 |
|| (uc >= 0x0780 && uc <= 0x07A5) |
|
2484 |
|| uc == 0x07B1 |
|
2485 |
|| uc == 0x200F |
|
2486 |
|| uc == 0xFB1D |
|
2487 |
|| (uc >= 0xFB1F && uc <= 0xFB28) |
|
2488 |
|| (uc >= 0xFB2A && uc <= 0xFB36) |
|
2489 |
|| (uc >= 0xFB38 && uc <= 0xFB3C) |
|
2490 |
|| uc == 0xFB3E |
|
2491 |
|| (uc >= 0xFB40 && uc <= 0xFB41) |
|
2492 |
|| (uc >= 0xFB43 && uc <= 0xFB44) |
|
2493 |
|| (uc >= 0xFB46 && uc <= 0xFBB1) |
|
2494 |
|| (uc >= 0xFBD3 && uc <= 0xFD3D) |
|
2495 |
|| (uc >= 0xFD50 && uc <= 0xFD8F) |
|
2496 |
|| (uc >= 0xFD92 && uc <= 0xFDC7) |
|
2497 |
|| (uc >= 0xFDF0 && uc <= 0xFDFC) |
|
2498 |
|| (uc >= 0xFE70 && uc <= 0xFE74) |
|
2499 |
|| (uc >= 0xFE76 && uc <= 0xFEFC); |
|
2500 |
} |
|
2501 |
||
2502 |
static bool isBidirectionalL(const QChar &ch) |
|
2503 |
{ |
|
2504 |
ushort uc = ch.unicode(); |
|
2505 |
if (uc < 0xaa) |
|
2506 |
return (uc >= 0x0041 && uc <= 0x005A) |
|
2507 |
|| (uc >= 0x0061 && uc <= 0x007A); |
|
2508 |
||
2509 |
if (uc == 0x00AA |
|
2510 |
|| uc == 0x00B5 |
|
2511 |
|| uc == 0x00BA |
|
2512 |
|| (uc >= 0x00C0 && uc <= 0x00D6) |
|
2513 |
|| (uc >= 0x00D8 && uc <= 0x00F6) |
|
2514 |
|| (uc >= 0x00F8 && uc <= 0x0220) |
|
2515 |
|| (uc >= 0x0222 && uc <= 0x0233) |
|
2516 |
|| (uc >= 0x0250 && uc <= 0x02AD) |
|
2517 |
|| (uc >= 0x02B0 && uc <= 0x02B8) |
|
2518 |
|| (uc >= 0x02BB && uc <= 0x02C1) |
|
2519 |
|| (uc >= 0x02D0 && uc <= 0x02D1) |
|
2520 |
|| (uc >= 0x02E0 && uc <= 0x02E4) |
|
2521 |
|| uc == 0x02EE |
|
2522 |
|| uc == 0x037A |
|
2523 |
|| uc == 0x0386 |
|
2524 |
|| (uc >= 0x0388 && uc <= 0x038A)) { |
|
2525 |
return true; |
|
2526 |
} |
|
2527 |
||
2528 |
if (uc == 0x038C |
|
2529 |
|| (uc >= 0x038E && uc <= 0x03A1) |
|
2530 |
|| (uc >= 0x03A3 && uc <= 0x03CE) |
|
2531 |
|| (uc >= 0x03D0 && uc <= 0x03F5) |
|
2532 |
|| (uc >= 0x0400 && uc <= 0x0482) |
|
2533 |
|| (uc >= 0x048A && uc <= 0x04CE) |
|
2534 |
|| (uc >= 0x04D0 && uc <= 0x04F5) |
|
2535 |
|| (uc >= 0x04F8 && uc <= 0x04F9) |
|
2536 |
|| (uc >= 0x0500 && uc <= 0x050F) |
|
2537 |
|| (uc >= 0x0531 && uc <= 0x0556) |
|
2538 |
|| (uc >= 0x0559 && uc <= 0x055F) |
|
2539 |
|| (uc >= 0x0561 && uc <= 0x0587) |
|
2540 |
|| uc == 0x0589 |
|
2541 |
|| uc == 0x0903 |
|
2542 |
|| (uc >= 0x0905 && uc <= 0x0939) |
|
2543 |
|| (uc >= 0x093D && uc <= 0x0940) |
|
2544 |
|| (uc >= 0x0949 && uc <= 0x094C) |
|
2545 |
|| uc == 0x0950) { |
|
2546 |
return true; |
|
2547 |
} |
|
2548 |
||
2549 |
if ((uc >= 0x0958 && uc <= 0x0961) |
|
2550 |
|| (uc >= 0x0964 && uc <= 0x0970) |
|
2551 |
|| (uc >= 0x0982 && uc <= 0x0983) |
|
2552 |
|| (uc >= 0x0985 && uc <= 0x098C) |
|
2553 |
|| (uc >= 0x098F && uc <= 0x0990) |
|
2554 |
|| (uc >= 0x0993 && uc <= 0x09A8) |
|
2555 |
|| (uc >= 0x09AA && uc <= 0x09B0) |
|
2556 |
|| uc == 0x09B2 |
|
2557 |
|| (uc >= 0x09B6 && uc <= 0x09B9) |
|
2558 |
|| (uc >= 0x09BE && uc <= 0x09C0) |
|
2559 |
|| (uc >= 0x09C7 && uc <= 0x09C8) |
|
2560 |
|| (uc >= 0x09CB && uc <= 0x09CC) |
|
2561 |
|| uc == 0x09D7 |
|
2562 |
|| (uc >= 0x09DC && uc <= 0x09DD) |
|
2563 |
|| (uc >= 0x09DF && uc <= 0x09E1) |
|
2564 |
|| (uc >= 0x09E6 && uc <= 0x09F1) |
|
2565 |
|| (uc >= 0x09F4 && uc <= 0x09FA) |
|
2566 |
|| (uc >= 0x0A05 && uc <= 0x0A0A) |
|
2567 |
|| (uc >= 0x0A0F && uc <= 0x0A10) |
|
2568 |
|| (uc >= 0x0A13 && uc <= 0x0A28) |
|
2569 |
|| (uc >= 0x0A2A && uc <= 0x0A30) |
|
2570 |
|| (uc >= 0x0A32 && uc <= 0x0A33)) { |
|
2571 |
return true; |
|
2572 |
} |
|
2573 |
||
2574 |
if ((uc >= 0x0A35 && uc <= 0x0A36) |
|
2575 |
|| (uc >= 0x0A38 && uc <= 0x0A39) |
|
2576 |
|| (uc >= 0x0A3E && uc <= 0x0A40) |
|
2577 |
|| (uc >= 0x0A59 && uc <= 0x0A5C) |
|
2578 |
|| uc == 0x0A5E |
|
2579 |
|| (uc >= 0x0A66 && uc <= 0x0A6F) |
|
2580 |
|| (uc >= 0x0A72 && uc <= 0x0A74) |
|
2581 |
|| uc == 0x0A83 |
|
2582 |
|| (uc >= 0x0A85 && uc <= 0x0A8B) |
|
2583 |
|| uc == 0x0A8D |
|
2584 |
|| (uc >= 0x0A8F && uc <= 0x0A91) |
|
2585 |
|| (uc >= 0x0A93 && uc <= 0x0AA8) |
|
2586 |
|| (uc >= 0x0AAA && uc <= 0x0AB0) |
|
2587 |
|| (uc >= 0x0AB2 && uc <= 0x0AB3) |
|
2588 |
|| (uc >= 0x0AB5 && uc <= 0x0AB9) |
|
2589 |
|| (uc >= 0x0ABD && uc <= 0x0AC0) |
|
2590 |
|| uc == 0x0AC9 |
|
2591 |
|| (uc >= 0x0ACB && uc <= 0x0ACC) |
|
2592 |
|| uc == 0x0AD0 |
|
2593 |
|| uc == 0x0AE0 |
|
2594 |
|| (uc >= 0x0AE6 && uc <= 0x0AEF) |
|
2595 |
|| (uc >= 0x0B02 && uc <= 0x0B03) |
|
2596 |
|| (uc >= 0x0B05 && uc <= 0x0B0C) |
|
2597 |
|| (uc >= 0x0B0F && uc <= 0x0B10) |
|
2598 |
|| (uc >= 0x0B13 && uc <= 0x0B28) |
|
2599 |
|| (uc >= 0x0B2A && uc <= 0x0B30)) { |
|
2600 |
return true; |
|
2601 |
} |
|
2602 |
||
2603 |
if ((uc >= 0x0B32 && uc <= 0x0B33) |
|
2604 |
|| (uc >= 0x0B36 && uc <= 0x0B39) |
|
2605 |
|| (uc >= 0x0B3D && uc <= 0x0B3E) |
|
2606 |
|| uc == 0x0B40 |
|
2607 |
|| (uc >= 0x0B47 && uc <= 0x0B48) |
|
2608 |
|| (uc >= 0x0B4B && uc <= 0x0B4C) |
|
2609 |
|| uc == 0x0B57 |
|
2610 |
|| (uc >= 0x0B5C && uc <= 0x0B5D) |
|
2611 |
|| (uc >= 0x0B5F && uc <= 0x0B61) |
|
2612 |
|| (uc >= 0x0B66 && uc <= 0x0B70) |
|
2613 |
|| uc == 0x0B83 |
|
2614 |
|| (uc >= 0x0B85 && uc <= 0x0B8A) |
|
2615 |
|| (uc >= 0x0B8E && uc <= 0x0B90) |
|
2616 |
|| (uc >= 0x0B92 && uc <= 0x0B95) |
|
2617 |
|| (uc >= 0x0B99 && uc <= 0x0B9A) |
|
2618 |
|| uc == 0x0B9C |
|
2619 |
|| (uc >= 0x0B9E && uc <= 0x0B9F) |
|
2620 |
|| (uc >= 0x0BA3 && uc <= 0x0BA4) |
|
2621 |
|| (uc >= 0x0BA8 && uc <= 0x0BAA) |
|
2622 |
|| (uc >= 0x0BAE && uc <= 0x0BB5) |
|
2623 |
|| (uc >= 0x0BB7 && uc <= 0x0BB9) |
|
2624 |
|| (uc >= 0x0BBE && uc <= 0x0BBF) |
|
2625 |
|| (uc >= 0x0BC1 && uc <= 0x0BC2) |
|
2626 |
|| (uc >= 0x0BC6 && uc <= 0x0BC8) |
|
2627 |
|| (uc >= 0x0BCA && uc <= 0x0BCC) |
|
2628 |
|| uc == 0x0BD7 |
|
2629 |
|| (uc >= 0x0BE7 && uc <= 0x0BF2) |
|
2630 |
|| (uc >= 0x0C01 && uc <= 0x0C03) |
|
2631 |
|| (uc >= 0x0C05 && uc <= 0x0C0C) |
|
2632 |
|| (uc >= 0x0C0E && uc <= 0x0C10) |
|
2633 |
|| (uc >= 0x0C12 && uc <= 0x0C28) |
|
2634 |
|| (uc >= 0x0C2A && uc <= 0x0C33) |
|
2635 |
|| (uc >= 0x0C35 && uc <= 0x0C39)) { |
|
2636 |
return true; |
|
2637 |
} |
|
2638 |
if ((uc >= 0x0C41 && uc <= 0x0C44) |
|
2639 |
|| (uc >= 0x0C60 && uc <= 0x0C61) |
|
2640 |
|| (uc >= 0x0C66 && uc <= 0x0C6F) |
|
2641 |
|| (uc >= 0x0C82 && uc <= 0x0C83) |
|
2642 |
|| (uc >= 0x0C85 && uc <= 0x0C8C) |
|
2643 |
|| (uc >= 0x0C8E && uc <= 0x0C90) |
|
2644 |
|| (uc >= 0x0C92 && uc <= 0x0CA8) |
|
2645 |
|| (uc >= 0x0CAA && uc <= 0x0CB3) |
|
2646 |
|| (uc >= 0x0CB5 && uc <= 0x0CB9) |
|
2647 |
|| uc == 0x0CBE |
|
2648 |
|| (uc >= 0x0CC0 && uc <= 0x0CC4) |
|
2649 |
|| (uc >= 0x0CC7 && uc <= 0x0CC8) |
|
2650 |
|| (uc >= 0x0CCA && uc <= 0x0CCB) |
|
2651 |
|| (uc >= 0x0CD5 && uc <= 0x0CD6) |
|
2652 |
|| uc == 0x0CDE |
|
2653 |
|| (uc >= 0x0CE0 && uc <= 0x0CE1) |
|
2654 |
|| (uc >= 0x0CE6 && uc <= 0x0CEF) |
|
2655 |
|| (uc >= 0x0D02 && uc <= 0x0D03) |
|
2656 |
|| (uc >= 0x0D05 && uc <= 0x0D0C) |
|
2657 |
|| (uc >= 0x0D0E && uc <= 0x0D10) |
|
2658 |
|| (uc >= 0x0D12 && uc <= 0x0D28) |
|
2659 |
|| (uc >= 0x0D2A && uc <= 0x0D39) |
|
2660 |
|| (uc >= 0x0D3E && uc <= 0x0D40) |
|
2661 |
|| (uc >= 0x0D46 && uc <= 0x0D48) |
|
2662 |
|| (uc >= 0x0D4A && uc <= 0x0D4C) |
|
2663 |
|| uc == 0x0D57 |
|
2664 |
|| (uc >= 0x0D60 && uc <= 0x0D61) |
|
2665 |
|| (uc >= 0x0D66 && uc <= 0x0D6F) |
|
2666 |
|| (uc >= 0x0D82 && uc <= 0x0D83) |
|
2667 |
|| (uc >= 0x0D85 && uc <= 0x0D96) |
|
2668 |
|| (uc >= 0x0D9A && uc <= 0x0DB1) |
|
2669 |
|| (uc >= 0x0DB3 && uc <= 0x0DBB) |
|
2670 |
|| uc == 0x0DBD) { |
|
2671 |
return true; |
|
2672 |
} |
|
2673 |
if ((uc >= 0x0DC0 && uc <= 0x0DC6) |
|
2674 |
|| (uc >= 0x0DCF && uc <= 0x0DD1) |
|
2675 |
|| (uc >= 0x0DD8 && uc <= 0x0DDF) |
|
2676 |
|| (uc >= 0x0DF2 && uc <= 0x0DF4) |
|
2677 |
|| (uc >= 0x0E01 && uc <= 0x0E30) |
|
2678 |
|| (uc >= 0x0E32 && uc <= 0x0E33) |
|
2679 |
|| (uc >= 0x0E40 && uc <= 0x0E46) |
|
2680 |
|| (uc >= 0x0E4F && uc <= 0x0E5B) |
|
2681 |
|| (uc >= 0x0E81 && uc <= 0x0E82) |
|
2682 |
|| uc == 0x0E84 |
|
2683 |
|| (uc >= 0x0E87 && uc <= 0x0E88) |
|
2684 |
|| uc == 0x0E8A |
|
2685 |
|| uc == 0x0E8D |
|
2686 |
|| (uc >= 0x0E94 && uc <= 0x0E97) |
|
2687 |
|| (uc >= 0x0E99 && uc <= 0x0E9F) |
|
2688 |
|| (uc >= 0x0EA1 && uc <= 0x0EA3) |
|
2689 |
|| uc == 0x0EA5 |
|
2690 |
|| uc == 0x0EA7 |
|
2691 |
|| (uc >= 0x0EAA && uc <= 0x0EAB) |
|
2692 |
|| (uc >= 0x0EAD && uc <= 0x0EB0) |
|
2693 |
|| (uc >= 0x0EB2 && uc <= 0x0EB3) |
|
2694 |
|| uc == 0x0EBD |
|
2695 |
|| (uc >= 0x0EC0 && uc <= 0x0EC4) |
|
2696 |
|| uc == 0x0EC6 |
|
2697 |
|| (uc >= 0x0ED0 && uc <= 0x0ED9) |
|
2698 |
|| (uc >= 0x0EDC && uc <= 0x0EDD) |
|
2699 |
|| (uc >= 0x0F00 && uc <= 0x0F17) |
|
2700 |
|| (uc >= 0x0F1A && uc <= 0x0F34) |
|
2701 |
|| uc == 0x0F36 |
|
2702 |
|| uc == 0x0F38 |
|
2703 |
|| (uc >= 0x0F3E && uc <= 0x0F47) |
|
2704 |
|| (uc >= 0x0F49 && uc <= 0x0F6A) |
|
2705 |
|| uc == 0x0F7F |
|
2706 |
|| uc == 0x0F85 |
|
2707 |
|| (uc >= 0x0F88 && uc <= 0x0F8B) |
|
2708 |
|| (uc >= 0x0FBE && uc <= 0x0FC5) |
|
2709 |
|| (uc >= 0x0FC7 && uc <= 0x0FCC) |
|
2710 |
|| uc == 0x0FCF) { |
|
2711 |
return true; |
|
2712 |
} |
|
2713 |
||
2714 |
if ((uc >= 0x1000 && uc <= 0x1021) |
|
2715 |
|| (uc >= 0x1023 && uc <= 0x1027) |
|
2716 |
|| (uc >= 0x1029 && uc <= 0x102A) |
|
2717 |
|| uc == 0x102C |
|
2718 |
|| uc == 0x1031 |
|
2719 |
|| uc == 0x1038 |
|
2720 |
|| (uc >= 0x1040 && uc <= 0x1057) |
|
2721 |
|| (uc >= 0x10A0 && uc <= 0x10C5) |
|
2722 |
|| (uc >= 0x10D0 && uc <= 0x10F8) |
|
2723 |
|| uc == 0x10FB |
|
2724 |
|| (uc >= 0x1100 && uc <= 0x1159) |
|
2725 |
|| (uc >= 0x115F && uc <= 0x11A2) |
|
2726 |
|| (uc >= 0x11A8 && uc <= 0x11F9) |
|
2727 |
|| (uc >= 0x1200 && uc <= 0x1206) |
|
2728 |
|| (uc >= 0x1208 && uc <= 0x1246) |
|
2729 |
|| uc == 0x1248 |
|
2730 |
|| (uc >= 0x124A && uc <= 0x124D) |
|
2731 |
|| (uc >= 0x1250 && uc <= 0x1256) |
|
2732 |
|| uc == 0x1258 |
|
2733 |
|| (uc >= 0x125A && uc <= 0x125D) |
|
2734 |
|| (uc >= 0x1260 && uc <= 0x1286) |
|
2735 |
|| uc == 0x1288 |
|
2736 |
|| (uc >= 0x128A && uc <= 0x128D) |
|
2737 |
|| (uc >= 0x1290 && uc <= 0x12AE) |
|
2738 |
|| uc == 0x12B0 |
|
2739 |
|| (uc >= 0x12B2 && uc <= 0x12B5) |
|
2740 |
|| (uc >= 0x12B8 && uc <= 0x12BE) |
|
2741 |
|| uc == 0x12C0 |
|
2742 |
|| (uc >= 0x12C2 && uc <= 0x12C5) |
|
2743 |
|| (uc >= 0x12C8 && uc <= 0x12CE) |
|
2744 |
|| (uc >= 0x12D0 && uc <= 0x12D6) |
|
2745 |
|| (uc >= 0x12D8 && uc <= 0x12EE) |
|
2746 |
|| (uc >= 0x12F0 && uc <= 0x130E) |
|
2747 |
|| uc == 0x1310) { |
|
2748 |
return true; |
|
2749 |
} |
|
2750 |
||
2751 |
if ((uc >= 0x1312 && uc <= 0x1315) |
|
2752 |
|| (uc >= 0x1318 && uc <= 0x131E) |
|
2753 |
|| (uc >= 0x1320 && uc <= 0x1346) |
|
2754 |
|| (uc >= 0x1348 && uc <= 0x135A) |
|
2755 |
|| (uc >= 0x1361 && uc <= 0x137C) |
|
2756 |
|| (uc >= 0x13A0 && uc <= 0x13F4) |
|
2757 |
|| (uc >= 0x1401 && uc <= 0x1676) |
|
2758 |
|| (uc >= 0x1681 && uc <= 0x169A) |
|
2759 |
|| (uc >= 0x16A0 && uc <= 0x16F0) |
|
2760 |
|| (uc >= 0x1700 && uc <= 0x170C) |
|
2761 |
|| (uc >= 0x170E && uc <= 0x1711) |
|
2762 |
|| (uc >= 0x1720 && uc <= 0x1731) |
|
2763 |
|| (uc >= 0x1735 && uc <= 0x1736) |
|
2764 |
|| (uc >= 0x1740 && uc <= 0x1751) |
|
2765 |
|| (uc >= 0x1760 && uc <= 0x176C) |
|
2766 |
|| (uc >= 0x176E && uc <= 0x1770) |
|
2767 |
|| (uc >= 0x1780 && uc <= 0x17B6) |
|
2768 |
|| (uc >= 0x17BE && uc <= 0x17C5) |
|
2769 |
|| (uc >= 0x17C7 && uc <= 0x17C8) |
|
2770 |
|| (uc >= 0x17D4 && uc <= 0x17DA) |
|
2771 |
|| uc == 0x17DC |
|
2772 |
|| (uc >= 0x17E0 && uc <= 0x17E9) |
|
2773 |
|| (uc >= 0x1810 && uc <= 0x1819) |
|
2774 |
|| (uc >= 0x1820 && uc <= 0x1877) |
|
2775 |
|| (uc >= 0x1880 && uc <= 0x18A8) |
|
2776 |
|| (uc >= 0x1E00 && uc <= 0x1E9B) |
|
2777 |
|| (uc >= 0x1EA0 && uc <= 0x1EF9) |
|
2778 |
|| (uc >= 0x1F00 && uc <= 0x1F15) |
|
2779 |
|| (uc >= 0x1F18 && uc <= 0x1F1D) |
|
2780 |
|| (uc >= 0x1F20 && uc <= 0x1F45) |
|
2781 |
|| (uc >= 0x1F48 && uc <= 0x1F4D) |
|
2782 |
|| (uc >= 0x1F50 && uc <= 0x1F57) |
|
2783 |
|| uc == 0x1F59 |
|
2784 |
|| uc == 0x1F5B |
|
2785 |
|| uc == 0x1F5D) { |
|
2786 |
return true; |
|
2787 |
} |
|
2788 |
||
2789 |
if ((uc >= 0x1F5F && uc <= 0x1F7D) |
|
2790 |
|| (uc >= 0x1F80 && uc <= 0x1FB4) |
|
2791 |
|| (uc >= 0x1FB6 && uc <= 0x1FBC) |
|
2792 |
|| uc == 0x1FBE |
|
2793 |
|| (uc >= 0x1FC2 && uc <= 0x1FC4) |
|
2794 |
|| (uc >= 0x1FC6 && uc <= 0x1FCC) |
|
2795 |
|| (uc >= 0x1FD0 && uc <= 0x1FD3) |
|
2796 |
|| (uc >= 0x1FD6 && uc <= 0x1FDB) |
|
2797 |
|| (uc >= 0x1FE0 && uc <= 0x1FEC) |
|
2798 |
|| (uc >= 0x1FF2 && uc <= 0x1FF4) |
|
2799 |
|| (uc >= 0x1FF6 && uc <= 0x1FFC) |
|
2800 |
|| uc == 0x200E |
|
2801 |
|| uc == 0x2071 |
|
2802 |
|| uc == 0x207F |
|
2803 |
|| uc == 0x2102 |
|
2804 |
|| uc == 0x2107 |
|
2805 |
|| (uc >= 0x210A && uc <= 0x2113) |
|
2806 |
|| uc == 0x2115 |
|
2807 |
|| (uc >= 0x2119 && uc <= 0x211D)) { |
|
2808 |
return true; |
|
2809 |
} |
|
2810 |
||
2811 |
if (uc == 0x2124 |
|
2812 |
|| uc == 0x2126 |
|
2813 |
|| uc == 0x2128 |
|
2814 |
|| (uc >= 0x212A && uc <= 0x212D) |
|
2815 |
|| (uc >= 0x212F && uc <= 0x2131) |
|
2816 |
|| (uc >= 0x2133 && uc <= 0x2139) |
|
2817 |
|| (uc >= 0x213D && uc <= 0x213F) |
|
2818 |
|| (uc >= 0x2145 && uc <= 0x2149) |
|
2819 |
|| (uc >= 0x2160 && uc <= 0x2183) |
|
2820 |
|| (uc >= 0x2336 && uc <= 0x237A) |
|
2821 |
|| uc == 0x2395 |
|
2822 |
|| (uc >= 0x249C && uc <= 0x24E9) |
|
2823 |
|| (uc >= 0x3005 && uc <= 0x3007) |
|
2824 |
|| (uc >= 0x3021 && uc <= 0x3029) |
|
2825 |
|| (uc >= 0x3031 && uc <= 0x3035) |
|
2826 |
|| (uc >= 0x3038 && uc <= 0x303C) |
|
2827 |
|| (uc >= 0x3041 && uc <= 0x3096) |
|
2828 |
|| (uc >= 0x309D && uc <= 0x309F) |
|
2829 |
|| (uc >= 0x30A1 && uc <= 0x30FA)) { |
|
2830 |
return true; |
|
2831 |
} |
|
2832 |
||
2833 |
if ((uc >= 0x30FC && uc <= 0x30FF) |
|
2834 |
|| (uc >= 0x3105 && uc <= 0x312C) |
|
2835 |
|| (uc >= 0x3131 && uc <= 0x318E) |
|
2836 |
|| (uc >= 0x3190 && uc <= 0x31B7) |
|
2837 |
|| (uc >= 0x31F0 && uc <= 0x321C) |
|
2838 |
|| (uc >= 0x3220 && uc <= 0x3243)) { |
|
2839 |
return true; |
|
2840 |
} |
|
2841 |
||
2842 |
if ((uc >= 0x3260 && uc <= 0x327B) |
|
2843 |
|| (uc >= 0x327F && uc <= 0x32B0) |
|
2844 |
|| (uc >= 0x32C0 && uc <= 0x32CB) |
|
2845 |
|| (uc >= 0x32D0 && uc <= 0x32FE) |
|
2846 |
|| (uc >= 0x3300 && uc <= 0x3376) |
|
2847 |
|| (uc >= 0x337B && uc <= 0x33DD)) { |
|
2848 |
return true; |
|
2849 |
} |
|
2850 |
if ((uc >= 0x33E0 && uc <= 0x33FE) |
|
2851 |
|| (uc >= 0x3400 && uc <= 0x4DB5) |
|
2852 |
|| (uc >= 0x4E00 && uc <= 0x9FA5) |
|
2853 |
|| (uc >= 0xA000 && uc <= 0xA48C) |
|
2854 |
|| (uc >= 0xAC00 && uc <= 0xD7A3) |
|
2855 |
|| (uc >= 0xD800 && uc <= 0xFA2D) |
|
2856 |
|| (uc >= 0xFA30 && uc <= 0xFA6A) |
|
2857 |
|| (uc >= 0xFB00 && uc <= 0xFB06) |
|
2858 |
|| (uc >= 0xFB13 && uc <= 0xFB17) |
|
2859 |
|| (uc >= 0xFF21 && uc <= 0xFF3A) |
|
2860 |
|| (uc >= 0xFF41 && uc <= 0xFF5A) |
|
2861 |
|| (uc >= 0xFF66 && uc <= 0xFFBE) |
|
2862 |
|| (uc >= 0xFFC2 && uc <= 0xFFC7) |
|
2863 |
|| (uc >= 0xFFCA && uc <= 0xFFCF) |
|
2864 |
|| (uc >= 0xFFD2 && uc <= 0xFFD7) |
|
2865 |
|| (uc >= 0xFFDA && uc <= 0xFFDC)) { |
|
2866 |
return true; |
|
2867 |
} |
|
2868 |
||
2869 |
/* ### Add NAMEPREP support for surrogates |
|
2870 |
|| (uc >= 0x10300 && uc <= 0x1031E) |
|
2871 |
|| (uc >= 0x10320 && uc <= 0x10323) |
|
2872 |
|| (uc >= 0x10330 && uc <= 0x1034A) |
|
2873 |
|| (uc >= 0x10400 && uc <= 0x10425) |
|
2874 |
|| (uc >= 0x10428 && uc <= 0x1044D) |
|
2875 |
|| (uc >= 0x1D000 && uc <= 0x1D0F5) |
|
2876 |
|| (uc >= 0x1D100 && uc <= 0x1D126) |
|
2877 |
|| (uc >= 0x1D12A && uc <= 0x1D166) |
|
2878 |
|| (uc >= 0x1D16A && uc <= 0x1D172) |
|
2879 |
|| (uc >= 0x1D183 && uc <= 0x1D184) |
|
2880 |
|| (uc >= 0x1D18C && uc <= 0x1D1A9) |
|
2881 |
|| (uc >= 0x1D1AE && uc <= 0x1D1DD) |
|
2882 |
|| (uc >= 0x1D400 && uc <= 0x1D454) |
|
2883 |
|| (uc >= 0x1D456 && uc <= 0x1D49C) |
|
2884 |
|| (uc >= 0x1D49E && uc <= 0x1D49F) |
|
2885 |
|| uc == 0x1D4A2 |
|
2886 |
|| (uc >= 0x1D4A5 && uc <= 0x1D4A6) |
|
2887 |
|| (uc >= 0x1D4A9 && uc <= 0x1D4AC) |
|
2888 |
|| (uc >= 0x1D4AE && uc <= 0x1D4B9) |
|
2889 |
|| uc == 0x1D4BB |
|
2890 |
|| (uc >= 0x1D4BD && uc <= 0x1D4C0) |
|
2891 |
|| (uc >= 0x1D4C2 && uc <= 0x1D4C3) |
|
2892 |
|| (uc >= 0x1D4C5 && uc <= 0x1D505) |
|
2893 |
|| (uc >= 0x1D507 && uc <= 0x1D50A) |
|
2894 |
|| (uc >= 0x1D50D && uc <= 0x1D514) |
|
2895 |
|| (uc >= 0x1D516 && uc <= 0x1D51C) |
|
2896 |
|| (uc >= 0x1D51E && uc <= 0x1D539) |
|
2897 |
|| (uc >= 0x1D53B && uc <= 0x1D53E) |
|
2898 |
|| (uc >= 0x1D540 && uc <= 0x1D544) |
|
2899 |
|| uc == 0x1D546 |
|
2900 |
|| (uc >= 0x1D54A && uc <= 0x1D550) |
|
2901 |
|| (uc >= 0x1D552 && uc <= 0x1D6A3) |
|
2902 |
|| (uc >= 0x1D6A8 && uc <= 0x1D7C9) |
|
2903 |
|| (uc >= 0x20000 && uc <= 0x2A6D6) |
|
2904 |
|| (uc >= 0x2F800 && uc <= 0x2FA1D) |
|
2905 |
|| (uc >= 0xF0000 && uc <= 0xFFFFD) |
|
2906 |
|| (uc >= 0x100000 && uc <= 0x10FFFD)*/ |
|
2907 |
||
2908 |
return false; |
|
2909 |
} |
|
2910 |
||
2911 |
#ifdef QT_BUILD_INTERNAL |
|
2912 |
// export for tst_qurl.cpp |
|
2913 |
Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from); |
|
2914 |
Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len); |
|
2915 |
#else |
|
2916 |
// non-test build, keep the symbols for ourselves |
|
2917 |
static void qt_nameprep(QString *source, int from); |
|
2918 |
static bool qt_check_std3rules(const QChar *uc, int len); |
|
2919 |
#endif |
|
2920 |
||
2921 |
void qt_nameprep(QString *source, int from) |
|
2922 |
{ |
|
2923 |
QChar *src = source->data(); // causes a detach, so we're sure the only one using it |
|
2924 |
QChar *out = src + from; |
|
2925 |
const QChar *e = src + source->size(); |
|
2926 |
||
2927 |
for ( ; out < e; ++out) { |
|
2928 |
register ushort uc = out->unicode(); |
|
2929 |
if (uc > 0x80) { |
|
2930 |
break; |
|
2931 |
} else if (uc >= 'A' && uc <= 'Z') { |
|
2932 |
*out = QChar(uc | 0x20); |
|
2933 |
} |
|
2934 |
} |
|
2935 |
if (out == e) |
|
2936 |
return; // everything was mapped easily (lowercased, actually) |
|
2937 |
int firstNonAscii = out - src; |
|
2938 |
||
2939 |
// Characters commonly mapped to nothing are simply removed |
|
2940 |
// (Table B.1) |
|
2941 |
const QChar *in = out; |
|
2942 |
while (in < e) { |
|
2943 |
if (!isMappedToNothing(*in)) |
|
2944 |
*out++ = *in; |
|
2945 |
++in; |
|
2946 |
} |
|
2947 |
if (out != in) |
|
2948 |
source->truncate(out - src); |
|
2949 |
||
2950 |
// Map to lowercase (Table B.2) |
|
2951 |
mapToLowerCase(source, firstNonAscii); |
|
2952 |
||
2953 |
// Normalize to Unicode 3.2 form KC |
|
2954 |
extern void qt_string_normalize(QString *data, QString::NormalizationForm mode, |
|
2955 |
QChar::UnicodeVersion version, int from); |
|
2956 |
qt_string_normalize(source, QString::NormalizationForm_KC, QChar::Unicode_3_2, firstNonAscii); |
|
2957 |
||
2958 |
// Strip prohibited output |
|
2959 |
stripProhibitedOutput(source, firstNonAscii); |
|
2960 |
||
2961 |
// Check for valid bidirectional characters |
|
2962 |
bool containsLCat = false; |
|
2963 |
bool containsRandALCat = false; |
|
2964 |
src = source->data(); |
|
2965 |
e = src + source->size(); |
|
2966 |
for (in = src + from; in < e && (!containsLCat || !containsRandALCat); ++in) { |
|
2967 |
if (isBidirectionalL(*in)) |
|
2968 |
containsLCat = true; |
|
2969 |
else if (isBidirectionalRorAL(*in)) |
|
2970 |
containsRandALCat = true; |
|
2971 |
} |
|
2972 |
if (containsRandALCat) { |
|
2973 |
if (containsLCat || (!isBidirectionalRorAL(src[from]) |
|
2974 |
|| !isBidirectionalRorAL(e[-1]))) |
|
2975 |
source->resize(from); // not allowed, clear the label |
|
2976 |
} |
|
2977 |
} |
|
2978 |
||
2979 |
bool qt_check_std3rules(const QChar *uc, int len) |
|
2980 |
{ |
|
2981 |
if (len > 63) |
|
2982 |
return false; |
|
2983 |
||
2984 |
for (int i = 0; i < len; ++i) { |
|
2985 |
register ushort c = uc[i].unicode(); |
|
2986 |
if (c == '-' && (i == 0 || i == len - 1)) |
|
2987 |
return false; |
|
2988 |
||
2989 |
// verifying the absence of LDH is the same as verifying that |
|
2990 |
// only LDH is present |
|
2991 |
if (c == '-' || (c >= '0' && c <= '9') |
|
2992 |
|| (c >= 'A' && c <= 'Z') |
|
2993 |
|| (c >= 'a' && c <= 'z')) |
|
2994 |
continue; |
|
2995 |
||
2996 |
return false; |
|
2997 |
} |
|
2998 |
||
2999 |
return true; |
|
3000 |
} |
|
3001 |
||
3002 |
||
3003 |
static inline uint encodeDigit(uint digit) |
|
3004 |
{ |
|
3005 |
return digit + 22 + 75 * (digit < 26); |
|
3006 |
} |
|
3007 |
||
3008 |
static inline uint adapt(uint delta, uint numpoints, bool firsttime) |
|
3009 |
{ |
|
3010 |
delta /= (firsttime ? damp : 2); |
|
3011 |
delta += (delta / numpoints); |
|
3012 |
||
3013 |
uint k = 0; |
|
3014 |
for (; delta > ((base - tmin) * tmax) / 2; k += base) |
|
3015 |
delta /= (base - tmin); |
|
3016 |
||
3017 |
return k + (((base - tmin + 1) * delta) / (delta + skew)); |
|
3018 |
} |
|
3019 |
||
3020 |
static inline void appendEncode(QString* output, uint& delta, uint& bias, uint& b, uint& h) |
|
3021 |
{ |
|
3022 |
uint qq; |
|
3023 |
uint k; |
|
3024 |
uint t; |
|
3025 |
||
3026 |
// insert the variable length delta integer; fail on |
|
3027 |
// overflow. |
|
3028 |
for (qq = delta, k = base;; k += base) { |
|
3029 |
// stop generating digits when the threshold is |
|
3030 |
// detected. |
|
3031 |
t = (k <= bias) ? tmin : (k >= bias + tmax) ? tmax : k - bias; |
|
3032 |
if (qq < t) break; |
|
3033 |
||
3034 |
*output += QChar(encodeDigit(t + (qq - t) % (base - t))); |
|
3035 |
qq = (qq - t) / (base - t); |
|
3036 |
} |
|
3037 |
||
3038 |
*output += QChar(encodeDigit(qq)); |
|
3039 |
bias = adapt(delta, h + 1, h == b); |
|
3040 |
delta = 0; |
|
3041 |
++h; |
|
3042 |
} |
|
3043 |
||
3044 |
static void toPunycodeHelper(const QChar *s, int ucLength, QString *output) |
|
3045 |
{ |
|
3046 |
uint n = initial_n; |
|
3047 |
uint delta = 0; |
|
3048 |
uint bias = initial_bias; |
|
3049 |
||
3050 |
int outLen = output->length(); |
|
3051 |
output->resize(outLen + ucLength); |
|
3052 |
||
3053 |
QChar *d = output->data() + outLen; |
|
3054 |
bool skipped = false; |
|
3055 |
// copy all basic code points verbatim to output. |
|
3056 |
for (uint j = 0; j < (uint) ucLength; ++j) { |
|
3057 |
ushort js = s[j].unicode(); |
|
3058 |
if (js < 0x80) |
|
3059 |
*d++ = js; |
|
3060 |
else |
|
3061 |
skipped = true; |
|
3062 |
} |
|
3063 |
||
3064 |
// if there were only basic code points, just return them |
|
3065 |
// directly; don't do any encoding. |
|
3066 |
if (!skipped) |
|
3067 |
return; |
|
3068 |
||
3069 |
output->truncate(d - output->constData()); |
|
3070 |
int copied = output->size() - outLen; |
|
3071 |
||
3072 |
// h and b now contain the number of basic code points in input. |
|
3073 |
uint b = copied; |
|
3074 |
uint h = copied; |
|
3075 |
||
3076 |
// if basic code points were copied, add the delimiter character. |
|
3077 |
if (h > 0) |
|
3078 |
*output += QChar(0x2d); |
|
3079 |
||
3080 |
// while there are still unprocessed non-basic code points left in |
|
3081 |
// the input string... |
|
3082 |
while (h < (uint) ucLength) { |
|
3083 |
// find the character in the input string with the lowest |
|
3084 |
// unicode value. |
|
3085 |
uint m = Q_MAXINT; |
|
3086 |
uint j; |
|
3087 |
for (j = 0; j < (uint) ucLength; ++j) { |
|
3088 |
if (s[j].unicode() >= n && s[j].unicode() < m) |
|
3089 |
m = (uint) s[j].unicode(); |
|
3090 |
} |
|
3091 |
||
3092 |
// reject out-of-bounds unicode characters |
|
3093 |
if (m - n > (Q_MAXINT - delta) / (h + 1)) { |
|
3094 |
output->truncate(outLen); |
|
3095 |
return; // punycode_overflow |
|
3096 |
} |
|
3097 |
||
3098 |
delta += (m - n) * (h + 1); |
|
3099 |
n = m; |
|
3100 |
||
3101 |
// for each code point in the input string |
|
3102 |
for (j = 0; j < (uint) ucLength; ++j) { |
|
3103 |
||
3104 |
// increase delta until we reach the character with the |
|
3105 |
// lowest unicode code. fail if delta overflows. |
|
3106 |
if (s[j].unicode() < n) { |
|
3107 |
++delta; |
|
3108 |
if (!delta) { |
|
3109 |
output->truncate(outLen); |
|
3110 |
return; // punycode_overflow |
|
3111 |
} |
|
3112 |
} |
|
3113 |
||
3114 |
// if j is the index of the character with the lowest |
|
3115 |
// unicode code... |
|
3116 |
if (s[j].unicode() == n) { |
|
3117 |
appendEncode(output, delta, bias, b, h); |
|
3118 |
} |
|
3119 |
} |
|
3120 |
||
3121 |
++delta; |
|
3122 |
++n; |
|
3123 |
} |
|
3124 |
||
3125 |
// prepend ACE prefix |
|
3126 |
output->insert(outLen, QLatin1String("xn--")); |
|
3127 |
return; |
|
3128 |
} |
|
3129 |
||
3130 |
||
3131 |
static const char * const idn_whitelist[] = { |
|
3132 |
"ac", "at", |
|
3133 |
"br", |
|
3134 |
"cat", "ch", "cl", "cn", |
|
3135 |
"de", "dk", |
|
3136 |
"fi", |
|
3137 |
"gr", |
|
3138 |
"hu", |
|
3139 |
"info", "io", "is", |
|
3140 |
"jp", |
|
3141 |
"kr", |
|
3142 |
"li", "lt", |
|
3143 |
"museum", |
|
3144 |
"no", |
|
3145 |
"org", |
|
3146 |
"se", "sh", |
|
3147 |
"th", "tm", "tw", |
|
3148 |
"vn", |
|
3149 |
}; |
|
3150 |
||
3151 |
static QStringList *user_idn_whitelist = 0; |
|
3152 |
||
3153 |
static bool lessThan(const QChar *a, int l, const char *c) |
|
3154 |
{ |
|
3155 |
const ushort *uc = (const ushort *)a; |
|
3156 |
const ushort *e = uc + l; |
|
3157 |
||
3158 |
if (!c || *c == 0) |
|
3159 |
return false; |
|
3160 |
||
3161 |
while (*c) { |
|
3162 |
if (uc == e || *uc != *c) |
|
3163 |
break; |
|
3164 |
++uc; |
|
3165 |
++c; |
|
3166 |
} |
|
3167 |
return (uc == e ? *c : *uc < *c); |
|
3168 |
} |
|
3169 |
||
3170 |
static bool equal(const QChar *a, int l, const char *b) |
|
3171 |
{ |
|
3172 |
while (l && a->unicode() && *b) { |
|
3173 |
if (*a != QLatin1Char(*b)) |
|
3174 |
return false; |
|
3175 |
++a; |
|
3176 |
++b; |
|
3177 |
--l; |
|
3178 |
} |
|
3179 |
return l == 0; |
|
3180 |
} |
|
3181 |
||
3182 |
static bool qt_is_idn_enabled(const QString &domain) |
|
3183 |
{ |
|
3184 |
int idx = domain.lastIndexOf(QLatin1Char('.')); |
|
3185 |
if (idx == -1) |
|
3186 |
return false; |
|
3187 |
||
3188 |
int len = domain.size() - idx - 1; |
|
3189 |
QString tldString(domain.constData() + idx + 1, len); |
|
3190 |
qt_nameprep(&tldString, 0); |
|
3191 |
||
3192 |
const QChar *tld = tldString.constData(); |
|
3193 |
||
3194 |
if (user_idn_whitelist) |
|
3195 |
return user_idn_whitelist->contains(tldString); |
|
3196 |
||
3197 |
int l = 0; |
|
3198 |
int r = sizeof(idn_whitelist)/sizeof(const char *) - 1; |
|
3199 |
int i = (l + r + 1) / 2; |
|
3200 |
||
3201 |
while (r != l) { |
|
3202 |
if (lessThan(tld, len, idn_whitelist[i])) |
|
3203 |
r = i - 1; |
|
3204 |
else |
|
3205 |
l = i; |
|
3206 |
i = (l + r + 1) / 2; |
|
3207 |
} |
|
3208 |
return equal(tld, len, idn_whitelist[i]); |
|
3209 |
} |
|
3210 |
||
3211 |
static inline bool isDotDelimiter(ushort uc) |
|
3212 |
{ |
|
3213 |
// IDNA / rfc3490 describes these four delimiters used for |
|
3214 |
// separating labels in unicode international domain |
|
3215 |
// names. |
|
3216 |
return uc == 0x2e || uc == 0x3002 || uc == 0xff0e || uc == 0xff61; |
|
3217 |
} |
|
3218 |
||
3219 |
static int nextDotDelimiter(const QString &domain, int from = 0) |
|
3220 |
{ |
|
3221 |
const QChar *b = domain.unicode(); |
|
3222 |
const QChar *ch = b + from; |
|
3223 |
const QChar *e = b + domain.length(); |
|
3224 |
while (ch < e) { |
|
3225 |
if (isDotDelimiter(ch->unicode())) |
|
3226 |
break; |
|
3227 |
else |
|
3228 |
++ch; |
|
3229 |
} |
|
3230 |
return ch - b; |
|
3231 |
} |
|
3232 |
||
3233 |
enum AceOperation { ToAceOnly, NormalizeAce }; |
|
3234 |
static QString qt_ACE_do(const QString &domain, AceOperation op) |
|
3235 |
{ |
|
3236 |
if (domain.isEmpty()) |
|
3237 |
return domain; |
|
3238 |
||
3239 |
QString result; |
|
3240 |
result.reserve(domain.length()); |
|
3241 |
||
3242 |
const bool isIdnEnabled = op == NormalizeAce ? qt_is_idn_enabled(domain) : false; |
|
3243 |
int lastIdx = 0; |
|
3244 |
QString aceForm; // this variable is here for caching |
|
3245 |
||
3246 |
while (1) { |
|
3247 |
int idx = nextDotDelimiter(domain, lastIdx); |
|
3248 |
int labelLength = idx - lastIdx; |
|
5
d3bac044e0f0
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
4
diff
changeset
|
3249 |
if (labelLength == 0) { |
d3bac044e0f0
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
4
diff
changeset
|
3250 |
if (idx == domain.length()) |
d3bac044e0f0
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
4
diff
changeset
|
3251 |
break; |
0 | 3252 |
return QString(); // two delimiters in a row -- empty label not allowed |
5
d3bac044e0f0
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
4
diff
changeset
|
3253 |
} |
0 | 3254 |
|
3255 |
// RFC 3490 says, about the ToASCII operation: |
|
3256 |
// 3. If the UseSTD3ASCIIRules flag is set, then perform these checks: |
|
3257 |
// |
|
3258 |
// (a) Verify the absence of non-LDH ASCII code points; that is, the |
|
3259 |
// absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F. |
|
3260 |
// |
|
3261 |
// (b) Verify the absence of leading and trailing hyphen-minus; that |
|
3262 |
// is, the absence of U+002D at the beginning and end of the |
|
3263 |
// sequence. |
|
3264 |
// and: |
|
3265 |
// 8. Verify that the number of code points is in the range 1 to 63 |
|
3266 |
// inclusive. |
|
3267 |
||
3268 |
// copy the label to the destination, which also serves as our scratch area, lowercasing it |
|
3269 |
int prevLen = result.size(); |
|
3270 |
bool simple = true; |
|
3271 |
result.resize(prevLen + labelLength); |
|
3272 |
{ |
|
3273 |
QChar *out = result.data() + prevLen; |
|
3274 |
const QChar *in = domain.constData() + lastIdx; |
|
3275 |
const QChar *e = in + labelLength; |
|
3276 |
for (; in < e; ++in, ++out) { |
|
3277 |
register ushort uc = in->unicode(); |
|
3278 |
if (uc > 0x7f) |
|
3279 |
simple = false; |
|
3280 |
if (uc >= 'A' && uc <= 'Z') |
|
3281 |
*out = QChar(uc | 0x20); |
|
3282 |
else |
|
3283 |
*out = *in; |
|
3284 |
} |
|
3285 |
} |
|
3286 |
||
3287 |
if (simple && labelLength > 6) { |
|
3288 |
// ACE form domains contain only ASCII characters, but we can't consider them simple |
|
3289 |
// is this an ACE form? |
|
3290 |
// the shortest valid ACE domain is 6 characters long (U+0080 would be 1, but it's not allowed) |
|
3291 |
static const ushort acePrefixUtf16[] = { 'x', 'n', '-', '-' }; |
|
3292 |
if (memcmp(result.constData() + prevLen, acePrefixUtf16, sizeof acePrefixUtf16) == 0) |
|
3293 |
simple = false; |
|
3294 |
} |
|
3295 |
||
3296 |
if (simple) { |
|
3297 |
// fastest case: this is the common case (non IDN-domains) |
|
3298 |
// so we're done |
|
3299 |
if (!qt_check_std3rules(result.constData() + prevLen, labelLength)) |
|
3300 |
return QString(); |
|
3301 |
} else { |
|
3302 |
// Punycode encoding and decoding cannot be done in-place |
|
3303 |
// That means we need one or two temporaries |
|
3304 |
qt_nameprep(&result, prevLen); |
|
3305 |
labelLength = result.length() - prevLen; |
|
3306 |
register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes |
|
3307 |
if (toReserve > aceForm.capacity()) |
|
3308 |
aceForm.reserve(toReserve); |
|
3309 |
toPunycodeHelper(result.constData() + prevLen, result.size() - prevLen, &aceForm); |
|
3310 |
||
3311 |
// We use resize()+memcpy() here because we're overwriting the data we've copied |
|
3312 |
if (isIdnEnabled) { |
|
3313 |
QString tmp = QUrl::fromPunycode(aceForm.toLatin1()); |
|
3314 |
if (tmp.isEmpty()) |
|
3315 |
return QString(); // shouldn't happen, since we've just punycode-encoded it |
|
3316 |
result.resize(prevLen + tmp.size()); |
|
3317 |
memcpy(result.data() + prevLen, tmp.constData(), tmp.size() * sizeof(QChar)); |
|
3318 |
} else { |
|
3319 |
result.resize(prevLen + aceForm.size()); |
|
3320 |
memcpy(result.data() + prevLen, aceForm.constData(), aceForm.size() * sizeof(QChar)); |
|
3321 |
} |
|
3322 |
||
3323 |
if (!qt_check_std3rules(aceForm.constData(), aceForm.size())) |
|
3324 |
return QString(); |
|
3325 |
} |
|
3326 |
||
3327 |
||
3328 |
lastIdx = idx + 1; |
|
3329 |
if (lastIdx < domain.size() + 1) |
|
3330 |
result += QLatin1Char('.'); |
|
3331 |
else |
|
3332 |
break; |
|
3333 |
} |
|
3334 |
return result; |
|
3335 |
} |
|
3336 |
||
3337 |
||
3338 |
QUrlPrivate::QUrlPrivate() |
|
3339 |
{ |
|
3340 |
ref = 1; |
|
3341 |
port = -1; |
|
3342 |
isValid = false; |
|
3343 |
parsingMode = QUrl::TolerantMode; |
|
3344 |
valueDelimiter = '='; |
|
3345 |
pairDelimiter = '&'; |
|
3346 |
stateFlags = 0; |
|
3347 |
hasFragment = false; |
|
3348 |
hasQuery = false; |
|
3349 |
} |
|
3350 |
||
3351 |
QUrlPrivate::QUrlPrivate(const QUrlPrivate ©) |
|
3352 |
: scheme(copy.scheme), |
|
3353 |
userName(copy.userName), |
|
3354 |
password(copy.password), |
|
3355 |
host(copy.host), |
|
3356 |
path(copy.path), |
|
3357 |
query(copy.query), |
|
3358 |
fragment(copy.fragment), |
|
3359 |
encodedOriginal(copy.encodedOriginal), |
|
3360 |
encodedUserName(copy.encodedUserName), |
|
3361 |
encodedPassword(copy.encodedPassword), |
|
3362 |
encodedPath(copy.encodedPath), |
|
3363 |
encodedFragment(copy.encodedFragment), |
|
3364 |
port(copy.port), |
|
3365 |
parsingMode(copy.parsingMode), |
|
3366 |
hasQuery(copy.hasQuery), |
|
3367 |
hasFragment(copy.hasFragment), |
|
3368 |
isValid(copy.isValid), |
|
3369 |
valueDelimiter(copy.valueDelimiter), |
|
3370 |
pairDelimiter(copy.pairDelimiter), |
|
3371 |
stateFlags(copy.stateFlags), |
|
3372 |
encodedNormalized(copy.encodedNormalized) |
|
3373 |
{ ref = 1; } |
|
3374 |
||
3375 |
QString QUrlPrivate::canonicalHost() const |
|
3376 |
{ |
|
3377 |
if (QURL_HASFLAG(stateFlags, HostCanonicalized) || host.isEmpty()) |
|
3378 |
return host; |
|
3379 |
||
3380 |
QUrlPrivate *that = const_cast<QUrlPrivate *>(this); |
|
3381 |
QURL_SETFLAG(that->stateFlags, HostCanonicalized); |
|
3382 |
if (host.contains(QLatin1Char(':'))) { |
|
3383 |
// This is an IP Literal, use _IPLiteral to validate |
|
3384 |
QByteArray ba = host.toLatin1(); |
|
3385 |
if (!ba.startsWith('[')) { |
|
3386 |
// surround the IP Literal with [ ] if it's not already done so |
|
3387 |
ba.reserve(ba.length() + 2); |
|
3388 |
ba.prepend('['); |
|
3389 |
ba.append(']'); |
|
3390 |
} |
|
3391 |
||
3392 |
const char *ptr = ba.constData(); |
|
3393 |
if (!_IPLiteral(&ptr)) |
|
3394 |
that->host.clear(); |
|
3395 |
else |
|
3396 |
that->host = host.toLower(); |
|
3397 |
} else { |
|
3398 |
that->host = qt_ACE_do(host, NormalizeAce); |
|
3399 |
} |
|
3400 |
return that->host; |
|
3401 |
} |
|
3402 |
||
3403 |
// From RFC 3896, Appendix A Collected ABNF for URI |
|
3404 |
// authority = [ userinfo "@" ] host [ ":" port ] |
|
3405 |
// userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) |
|
3406 |
// host = IP-literal / IPv4address / reg-name |
|
3407 |
// port = *DIGIT |
|
3408 |
//[...] |
|
3409 |
// pchar = unreserved / pct-encoded / sub-delims / ":" / "@" |
|
3410 |
// |
|
3411 |
// query = *( pchar / "/" / "?" ) |
|
3412 |
// |
|
3413 |
// fragment = *( pchar / "/" / "?" ) |
|
3414 |
// |
|
3415 |
// pct-encoded = "%" HEXDIG HEXDIG |
|
3416 |
// |
|
3417 |
// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" |
|
3418 |
// reserved = gen-delims / sub-delims |
|
3419 |
// gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" |
|
3420 |
// sub-delims = "!" / "$" / "&" / "'" / "(" / ")" |
|
3421 |
// / "*" / "+" / "," / ";" / "=" |
|
3422 |
||
3423 |
// use defines for concatenation: |
|
3424 |
#define ABNF_sub_delims "!$&'()*+,;=" |
|
3425 |
#define ABNF_gen_delims ":/?#[]@" |
|
3426 |
#define ABNF_pchar ABNF_sub_delims ":@" |
|
3427 |
#define ABNF_reserved ABNF_sub_delims ABNF_gen_delims |
|
3428 |
||
3429 |
// list the characters that don't have to be converted according to the list above. |
|
3430 |
// "unreserved" is already automatically not encoded, so we don't have to list it. |
|
3431 |
// the path component has a complex ABNF that basically boils down to |
|
3432 |
// slash-separated segments of "pchar" |
|
3433 |
||
3434 |
static const char userNameExcludeChars[] = ABNF_sub_delims; |
|
3435 |
static const char passwordExcludeChars[] = ABNF_sub_delims ":"; |
|
3436 |
static const char pathExcludeChars[] = ABNF_pchar "/"; |
|
3437 |
static const char queryExcludeChars[] = ABNF_pchar "/?"; |
|
3438 |
static const char fragmentExcludeChars[] = ABNF_pchar "/?"; |
|
3439 |
||
3440 |
void QUrlPrivate::ensureEncodedParts() const |
|
3441 |
{ |
|
3442 |
QUrlPrivate *that = const_cast<QUrlPrivate *>(this); |
|
3443 |
||
3444 |
if (encodedUserName.isNull()) |
|
3445 |
// userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) |
|
3446 |
that->encodedUserName = toPercentEncodingHelper(userName, userNameExcludeChars); |
|
3447 |
if (encodedPassword.isNull()) |
|
3448 |
// userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) |
|
3449 |
that->encodedPassword = toPercentEncodingHelper(password, passwordExcludeChars); |
|
3450 |
if (encodedPath.isNull()) |
|
3451 |
// pchar = unreserved / pct-encoded / sub-delims / ":" / "@" ... also "/" |
|
3452 |
that->encodedPath = toPercentEncodingHelper(path, pathExcludeChars); |
|
3453 |
if (encodedFragment.isNull()) |
|
3454 |
// fragment = *( pchar / "/" / "?" ) |
|
3455 |
that->encodedFragment = toPercentEncodingHelper(fragment, fragmentExcludeChars); |
|
3456 |
} |
|
3457 |
||
3458 |
QString QUrlPrivate::authority(QUrl::FormattingOptions options) const |
|
3459 |
{ |
|
3460 |
if ((options & QUrl::RemoveAuthority) == QUrl::RemoveAuthority) |
|
3461 |
return QString(); |
|
3462 |
||
3463 |
QString tmp = userInfo(options); |
|
3464 |
if (!tmp.isEmpty()) |
|
3465 |
tmp += QLatin1Char('@'); |
|
3466 |
tmp += canonicalHost(); |
|
3467 |
if (!(options & QUrl::RemovePort) && port != -1) |
|
3468 |
tmp += QLatin1Char(':') + QString::number(port); |
|
3469 |
||
3470 |
return tmp; |
|
3471 |
} |
|
3472 |
||
3473 |
void QUrlPrivate::setAuthority(const QString &auth) |
|
3474 |
{ |
|
3475 |
if (auth.isEmpty()) |
|
3476 |
return; |
|
3477 |
||
3478 |
// find the port section of the authority by searching from the |
|
3479 |
// end towards the beginning for numbers until a ':' is reached. |
|
3480 |
int portIndex = auth.length() - 1; |
|
3481 |
if (portIndex == 0) { |
|
3482 |
portIndex = -1; |
|
3483 |
} else { |
|
3484 |
short c = auth.at(portIndex--).unicode(); |
|
3485 |
if (c < '0' || c > '9') { |
|
3486 |
portIndex = -1; |
|
3487 |
} else while (portIndex >= 0) { |
|
3488 |
c = auth.at(portIndex).unicode(); |
|
3489 |
if (c == ':') { |
|
3490 |
break; |
|
3491 |
} else if (c == '.') { |
|
3492 |
portIndex = -1; |
|
3493 |
break; |
|
3494 |
} |
|
3495 |
--portIndex; |
|
3496 |
} |
|
3497 |
} |
|
3498 |
||
3499 |
if (portIndex != -1) { |
|
3500 |
port = 0; |
|
3501 |
for (int i = portIndex + 1; i < auth.length(); ++i) |
|
3502 |
port = (port * 10) + (auth.at(i).unicode() - '0'); |
|
3503 |
} else { |
|
3504 |
port = -1; |
|
3505 |
} |
|
3506 |
||
3507 |
int userInfoIndex = auth.indexOf(QLatin1Char('@')); |
|
3508 |
if (userInfoIndex != -1 && (portIndex == -1 || userInfoIndex < portIndex)) |
|
3509 |
setUserInfo(auth.left(userInfoIndex)); |
|
3510 |
||
3511 |
int hostIndex = 0; |
|
3512 |
if (userInfoIndex != -1) |
|
3513 |
hostIndex = userInfoIndex + 1; |
|
3514 |
int hostLength = auth.length() - hostIndex; |
|
3515 |
if (portIndex != -1) |
|
3516 |
hostLength -= (auth.length() - portIndex); |
|
3517 |
||
3518 |
host = auth.mid(hostIndex, hostLength).trimmed(); |
|
3519 |
} |
|
3520 |
||
3521 |
void QUrlPrivate::setUserInfo(const QString &userInfo) |
|
3522 |
{ |
|
3523 |
encodedUserName.clear(); |
|
3524 |
encodedPassword.clear(); |
|
3525 |
||
3526 |
int delimIndex = userInfo.indexOf(QLatin1Char(':')); |
|
3527 |
if (delimIndex == -1) { |
|
3528 |
userName = userInfo; |
|
3529 |
password.clear(); |
|
3530 |
return; |
|
3531 |
} |
|
3532 |
userName = userInfo.left(delimIndex); |
|
3533 |
password = userInfo.right(userInfo.length() - delimIndex - 1); |
|
3534 |
} |
|
3535 |
||
3536 |
void QUrlPrivate::setEncodedUserInfo(const QUrlParseData *parseData) |
|
3537 |
{ |
|
3538 |
userName.clear(); |
|
3539 |
password.clear(); |
|
3540 |
if (!parseData->userInfoLength) { |
|
3541 |
encodedUserName.clear(); |
|
3542 |
encodedPassword.clear(); |
|
3543 |
} else if (parseData->userInfoDelimIndex == -1) { |
|
3544 |
encodedUserName = QByteArray(parseData->userInfo, parseData->userInfoLength); |
|
3545 |
encodedPassword.clear(); |
|
3546 |
} else { |
|
3547 |
encodedUserName = QByteArray(parseData->userInfo, parseData->userInfoDelimIndex); |
|
3548 |
encodedPassword = QByteArray(parseData->userInfo + parseData->userInfoDelimIndex + 1, |
|
3549 |
parseData->userInfoLength - parseData->userInfoDelimIndex - 1); |
|
3550 |
} |
|
3551 |
} |
|
3552 |
||
3553 |
QString QUrlPrivate::userInfo(QUrl::FormattingOptions options) const |
|
3554 |
{ |
|
3555 |
if ((options & QUrl::RemoveUserInfo) == QUrl::RemoveUserInfo) |
|
3556 |
return QString(); |
|
3557 |
||
3558 |
QUrlPrivate *that = const_cast<QUrlPrivate *>(this); |
|
3559 |
if (userName.isNull()) |
|
3560 |
that->userName = fromPercentEncodingHelper(encodedUserName); |
|
3561 |
if (password.isNull()) |
|
3562 |
that->password = fromPercentEncodingHelper(encodedPassword); |
|
3563 |
||
3564 |
QString tmp = userName; |
|
3565 |
||
3566 |
if (!(options & QUrl::RemovePassword) && !password.isEmpty()) { |
|
3567 |
tmp += QLatin1Char(':'); |
|
3568 |
tmp += password; |
|
3569 |
} |
|
3570 |
||
3571 |
return tmp; |
|
3572 |
} |
|
3573 |
||
3574 |
/* |
|
3575 |
From http://www.ietf.org/rfc/rfc3986.txt, 5.2.3: Merge paths |
|
3576 |
||
3577 |
Returns a merge of the current path with the relative path passed |
|
3578 |
as argument. |
|
3579 |
*/ |
|
3580 |
QByteArray QUrlPrivate::mergePaths(const QByteArray &relativePath) const |
|
3581 |
{ |
|
3582 |
if (encodedPath.isNull()) |
|
3583 |
ensureEncodedParts(); |
|
3584 |
||
3585 |
// If the base URI has a defined authority component and an empty |
|
3586 |
// path, then return a string consisting of "/" concatenated with |
|
3587 |
// the reference's path; otherwise, |
|
3588 |
if (!authority().isEmpty() && encodedPath.isEmpty()) |
|
3589 |
return '/' + relativePath; |
|
3590 |
||
3591 |
// Return a string consisting of the reference's path component |
|
3592 |
// appended to all but the last segment of the base URI's path |
|
3593 |
// (i.e., excluding any characters after the right-most "/" in the |
|
3594 |
// base URI path, or excluding the entire base URI path if it does |
|
3595 |
// not contain any "/" characters). |
|
3596 |
QByteArray newPath; |
|
3597 |
if (!encodedPath.contains('/')) |
|
3598 |
newPath = relativePath; |
|
3599 |
else |
|
3600 |
newPath = encodedPath.left(encodedPath.lastIndexOf('/') + 1) + relativePath; |
|
3601 |
||
3602 |
return newPath; |
|
3603 |
} |
|
3604 |
||
3605 |
void QUrlPrivate::queryItem(int pos, int *value, int *end) |
|
3606 |
{ |
|
3607 |
*end = query.indexOf(pairDelimiter, pos); |
|
3608 |
if (*end == -1) |
|
3609 |
*end = query.size(); |
|
3610 |
*value = pos; |
|
3611 |
while (*value < *end) { |
|
3612 |
if (query[*value] == valueDelimiter) |
|
3613 |
break; |
|
3614 |
++*value; |
|
3615 |
} |
|
3616 |
} |
|
3617 |
||
3618 |
/* |
|
3619 |
From http://www.ietf.org/rfc/rfc3986.txt, 5.2.4: Remove dot segments |
|
3620 |
||
3621 |
Removes unnecessary ../ and ./ from the path. Used for normalizing |
|
3622 |
the URL. |
|
3623 |
*/ |
|
3624 |
static void removeDotsFromPath(QByteArray *path) |
|
3625 |
{ |
|
3626 |
// The input buffer is initialized with the now-appended path |
|
3627 |
// components and the output buffer is initialized to the empty |
|
3628 |
// string. |
|
3629 |
char *out = path->data(); |
|
3630 |
const char *in = out; |
|
3631 |
const char *end = out + path->size(); |
|
3632 |
||
3633 |
// If the input buffer consists only of |
|
3634 |
// "." or "..", then remove that from the input |
|
3635 |
// buffer; |
|
3636 |
if (path->size() == 1 && in[0] == '.') |
|
3637 |
++in; |
|
3638 |
else if (path->size() == 2 && in[0] == '.' && in[1] == '.') |
|
3639 |
in += 2; |
|
3640 |
// While the input buffer is not empty, loop: |
|
3641 |
while (in < end) { |
|
3642 |
||
3643 |
// otherwise, if the input buffer begins with a prefix of "../" or "./", |
|
3644 |
// then remove that prefix from the input buffer; |
|
3645 |
if (path->size() >= 2 && in[0] == '.' && in[1] == '/') |
|
3646 |
in += 2; |
|
3647 |
else if (path->size() >= 3 && in[0] == '.' && in[1] == '.' && in[2] == '/') |
|
3648 |
in += 3; |
|
3649 |
||
3650 |
// otherwise, if the input buffer begins with a prefix of |
|
3651 |
// "/./" or "/.", where "." is a complete path segment, |
|
3652 |
// then replace that prefix with "/" in the input buffer; |
|
3653 |
if (in <= end - 3 && in[0] == '/' && in[1] == '.' && in[2] == '/') { |
|
3654 |
in += 2; |
|
3655 |
continue; |
|
3656 |
} else if (in == end - 2 && in[0] == '/' && in[1] == '.') { |
|
3657 |
*out++ = '/'; |
|
3658 |
in += 2; |
|
3659 |
break; |
|
3660 |
} |
|
3661 |
||
3662 |
// otherwise, if the input buffer begins with a prefix |
|
3663 |
// of "/../" or "/..", where ".." is a complete path |
|
3664 |
// segment, then replace that prefix with "/" in the |
|
3665 |
// input buffer and remove the last //segment and its |
|
3666 |
// preceding "/" (if any) from the output buffer; |
|
3667 |
if (in <= end - 4 && in[0] == '/' && in[1] == '.' && in[2] == '.' && in[3] == '/') { |
|
3668 |
while (out > path->constData() && *(--out) != '/') |
|
3669 |
; |
|
3670 |
if (out == path->constData() && *out != '/') |
|
3671 |
++in; |
|
3672 |
in += 3; |
|
3673 |
continue; |
|
3674 |
} else if (in == end - 3 && in[0] == '/' && in[1] == '.' && in[2] == '.') { |
|
3675 |
while (out > path->constData() && *(--out) != '/') |
|
3676 |
; |
|
3677 |
if (*out == '/') |
|
3678 |
++out; |
|
3679 |
in += 3; |
|
3680 |
break; |
|
3681 |
} |
|
3682 |
||
3683 |
// otherwise move the first path segment in |
|
3684 |
// the input buffer to the end of the output |
|
3685 |
// buffer, including the initial "/" character |
|
3686 |
// (if any) and any subsequent characters up |
|
3687 |
// to, but not including, the next "/" |
|
3688 |
// character or the end of the input buffer. |
|
3689 |
*out++ = *in++; |
|
3690 |
while (in < end && *in != '/') |
|
3691 |
*out++ = *in++; |
|
3692 |
} |
|
3693 |
path->truncate(out - path->constData()); |
|
3694 |
} |
|
3695 |
||
3696 |
void QUrlPrivate::validate() const |
|
3697 |
{ |
|
3698 |
QUrlPrivate *that = (QUrlPrivate *)this; |
|
3699 |
that->encodedOriginal = that->toEncoded(); // may detach |
|
3700 |
parse(ParseOnly); |
|
3701 |
||
3702 |
QURL_SETFLAG(that->stateFlags, Validated); |
|
3703 |
||
3704 |
if (!isValid) |
|
3705 |
return; |
|
3706 |
||
3707 |
QString auth = authority(); // causes the non-encoded forms to be valid |
|
3708 |
||
3709 |
if (scheme == QLatin1String("mailto")) { |
|
3710 |
if (!host.isEmpty() || port != -1 || !userName.isEmpty() || !password.isEmpty()) { |
|
3711 |
that->isValid = false; |
|
3712 |
that->errorInfo.setParams(0, QT_TRANSLATE_NOOP(QUrl, "expected empty host, username," |
|
3713 |
"port and password"), |
|
3714 |
0, 0); |
|
3715 |
} |
|
3716 |
} else if (scheme == QLatin1String("ftp") || scheme == QLatin1String("http")) { |
|
3717 |
if (host.isEmpty() && !(path.isEmpty() && encodedPath.isEmpty())) { |
|
3718 |
that->isValid = false; |
|
3719 |
that->errorInfo.setParams(0, QT_TRANSLATE_NOOP(QUrl, "the host is empty, but not the path"), |
|
3720 |
0, 0); |
|
3721 |
} |
|
3722 |
} |
|
3723 |
} |
|
3724 |
||
3725 |
void QUrlPrivate::parse(ParseOptions parseOptions) const |
|
3726 |
{ |
|
3727 |
QUrlPrivate *that = (QUrlPrivate *)this; |
|
3728 |
that->errorInfo.setParams(0, 0, 0, 0); |
|
3729 |
if (encodedOriginal.isEmpty()) { |
|
3730 |
that->isValid = false; |
|
3731 |
that->errorInfo.setParams(0, QT_TRANSLATE_NOOP(QUrl, "empty"), |
|
3732 |
0, 0); |
|
3733 |
QURL_SETFLAG(that->stateFlags, Validated | Parsed); |
|
3734 |
return; |
|
3735 |
} |
|
3736 |
||
3737 |
||
3738 |
QUrlParseData parseData; |
|
3739 |
memset(&parseData, 0, sizeof(parseData)); |
|
3740 |
parseData.userInfoDelimIndex = -1; |
|
3741 |
parseData.port = -1; |
|
3742 |
||
3743 |
const char *pptr = (char *) encodedOriginal.constData(); |
|
3744 |
const char **ptr = &pptr; |
|
3745 |
||
3746 |
#if defined (QURL_DEBUG) |
|
3747 |
qDebug("QUrlPrivate::parse(), parsing \"%s\"", pptr); |
|
3748 |
#endif |
|
3749 |
||
3750 |
// optional scheme |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3751 |
bool isSchemeValid = _scheme(ptr, &parseData); |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3752 |
|
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3753 |
if (isSchemeValid == false) { |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3754 |
that->isValid = false; |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3755 |
char ch = *((*ptr)++); |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3756 |
that->errorInfo.setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "unexpected URL scheme"), |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3757 |
0, ch); |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3758 |
QURL_SETFLAG(that->stateFlags, Validated | Parsed); |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3759 |
#if defined (QURL_DEBUG) |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3760 |
qDebug("QUrlPrivate::parse(), unrecognized: %c%s", ch, *ptr); |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3761 |
#endif |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3762 |
return; |
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
5
diff
changeset
|
3763 |
} |
0 | 3764 |
|
3765 |
// hierpart |
|
3766 |
_hierPart(ptr, &parseData); |
|
3767 |
||
3768 |
// optional query |
|
3769 |
char ch = *((*ptr)++); |
|
3770 |
if (ch == '?') { |
|
3771 |
that->hasQuery = true; |
|
3772 |
_query(ptr, &parseData); |
|
3773 |
ch = *((*ptr)++); |
|
3774 |
} |
|
3775 |
||
3776 |
// optional fragment |
|
3777 |
if (ch == '#') { |
|
3778 |
that->hasFragment = true; |
|
3779 |
_fragment(ptr, &parseData); |
|
3780 |
} else if (ch != '\0') { |
|
3781 |
that->isValid = false; |
|
3782 |
that->errorInfo.setParams(*ptr, QT_TRANSLATE_NOOP(QUrl, "expected end of URL"), |
|
3783 |
0, ch); |
|
3784 |
QURL_SETFLAG(that->stateFlags, Validated | Parsed); |
|
3785 |
#if defined (QURL_DEBUG) |
|
3786 |
qDebug("QUrlPrivate::parse(), unrecognized: %c%s", ch, *ptr); |
|
3787 |
#endif |
|
3788 |
return; |
|
3789 |
} |
|
3790 |
||
3791 |
// when doing lazy validation, this function is called after |
|
3792 |
// encodedOriginal has been constructed from the individual parts, |
|
3793 |
// only to see if the constructed URL can be parsed. in that case, |
|
3794 |
// parse() is called in ParseOnly mode; we don't want to set all |
|
3795 |
// the members over again. |
|
3796 |
if (parseOptions == ParseAndSet) { |
|
3797 |
QURL_UNSETFLAG(that->stateFlags, HostCanonicalized); |
|
3798 |
||
3799 |
if (parseData.scheme) { |
|
3800 |
QByteArray s(parseData.scheme, parseData.schemeLength); |
|
3801 |
that->scheme = fromPercentEncodingMutable(&s); |
|
3802 |
} |
|
3803 |
||
3804 |
that->setEncodedUserInfo(&parseData); |
|
3805 |
||
3806 |
QByteArray h(parseData.host, parseData.hostLength); |
|
3807 |
that->host = fromPercentEncodingMutable(&h); |
|
3808 |
that->port = parseData.port; |
|
3809 |
||
3810 |
that->path.clear(); |
|
3811 |
that->encodedPath = QByteArray(parseData.path, parseData.pathLength); |
|
3812 |
||
3813 |
if (that->hasQuery) |
|
3814 |
that->query = QByteArray(parseData.query, parseData.queryLength); |
|
3815 |
else |
|
3816 |
that->query.clear(); |
|
3817 |
||
3818 |
that->fragment.clear(); |
|
3819 |
if (that->hasFragment) { |
|
3820 |
that->encodedFragment = QByteArray(parseData.fragment, parseData.fragmentLength); |
|
3821 |
} else { |
|
3822 |
that->encodedFragment.clear(); |
|
3823 |
} |
|
3824 |
} |
|
3825 |
||
3826 |
that->isValid = true; |
|
3827 |
QURL_SETFLAG(that->stateFlags, Parsed); |
|
3828 |
||
3829 |
#if defined (QURL_DEBUG) |
|
3830 |
qDebug("QUrl::setUrl(), scheme = %s", that->scheme.toLatin1().constData()); |
|
3831 |
qDebug("QUrl::setUrl(), userInfo = %s", that->userInfo.toLatin1().constData()); |
|
3832 |
qDebug("QUrl::setUrl(), host = %s", that->host.toLatin1().constData()); |
|
3833 |
qDebug("QUrl::setUrl(), port = %i", that->port); |
|
3834 |
qDebug("QUrl::setUrl(), path = %s", fromPercentEncodingHelper(__path).toLatin1().constData()); |
|
3835 |
qDebug("QUrl::setUrl(), query = %s", __query.constData()); |
|
3836 |
qDebug("QUrl::setUrl(), fragment = %s", fromPercentEncodingHelper(__fragment).toLatin1().constData()); |
|
3837 |
#endif |
|
3838 |
} |
|
3839 |
||
3840 |
void QUrlPrivate::clear() |
|
3841 |
{ |
|
3842 |
scheme.clear(); |
|
3843 |
userName.clear(); |
|
3844 |
password.clear(); |
|
3845 |
host.clear(); |
|
3846 |
port = -1; |
|
3847 |
path.clear(); |
|
3848 |
query.clear(); |
|
3849 |
fragment.clear(); |
|
3850 |
||
3851 |
encodedOriginal.clear(); |
|
3852 |
encodedUserName.clear(); |
|
3853 |
encodedPassword.clear(); |
|
3854 |
encodedPath.clear(); |
|
3855 |
encodedFragment.clear(); |
|
3856 |
encodedNormalized.clear(); |
|
3857 |
||
3858 |
isValid = false; |
|
3859 |
hasQuery = false; |
|
3860 |
hasFragment = false; |
|
3861 |
||
3862 |
valueDelimiter = '='; |
|
3863 |
pairDelimiter = '&'; |
|
3864 |
||
3865 |
QURL_UNSETFLAG(stateFlags, Parsed | Validated | Normalized | HostCanonicalized); |
|
3866 |
} |
|
3867 |
||
3868 |
QByteArray QUrlPrivate::toEncoded(QUrl::FormattingOptions options) const |
|
3869 |
{ |
|
3870 |
if (!QURL_HASFLAG(stateFlags, Parsed)) parse(); |
|
3871 |
else ensureEncodedParts(); |
|
3872 |
||
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3873 |
if (options==0x100) // private - see qHash(QUrl) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3874 |
return normalized(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3875 |
|
0 | 3876 |
QByteArray url; |
3877 |
||
3878 |
if (!(options & QUrl::RemoveScheme) && !scheme.isEmpty()) { |
|
3879 |
url += scheme.toLatin1(); |
|
3880 |
url += ':'; |
|
3881 |
} |
|
3882 |
QString auth = authority(); |
|
3883 |
bool doFileScheme = scheme == QLatin1String("file") && encodedPath.startsWith('/'); |
|
3884 |
if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority && (!auth.isEmpty() || doFileScheme)) { |
|
3885 |
if (doFileScheme && !encodedPath.startsWith('/')) |
|
3886 |
url += '/'; |
|
3887 |
url += "//"; |
|
3888 |
||
3889 |
if ((options & QUrl::RemoveUserInfo) != QUrl::RemoveUserInfo) { |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3890 |
bool hasUserOrPass = false; |
0 | 3891 |
if (!userName.isEmpty()) { |
3892 |
url += encodedUserName; |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3893 |
hasUserOrPass = true; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3894 |
} |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3895 |
if (!(options & QUrl::RemovePassword) && !password.isEmpty()) { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3896 |
url += ':'; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3897 |
url += encodedPassword; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3898 |
hasUserOrPass = true; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3899 |
} |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3900 |
if (hasUserOrPass) |
0 | 3901 |
url += '@'; |
3902 |
} |
|
3903 |
||
3904 |
if (host.startsWith(QLatin1Char('['))) { |
|
3905 |
url += host.toLatin1(); |
|
3906 |
} else if (host.contains(QLatin1Char(':'))) { |
|
3907 |
url += '['; |
|
3908 |
url += host.toLatin1(); |
|
3909 |
url += ']'; |
|
3910 |
} else { |
|
3911 |
url += QUrl::toAce(host); |
|
3912 |
} |
|
3913 |
if (!(options & QUrl::RemovePort) && port != -1) { |
|
3914 |
url += ':'; |
|
3915 |
url += QString::number(port).toAscii(); |
|
3916 |
} |
|
3917 |
} |
|
3918 |
||
3919 |
if (!(options & QUrl::RemovePath)) { |
|
3920 |
// check if we need to insert a slash |
|
3921 |
if (!encodedPath.isEmpty() && !auth.isEmpty()) { |
|
3922 |
if (!encodedPath.startsWith('/')) |
|
3923 |
url += '/'; |
|
3924 |
} |
|
3925 |
url += encodedPath; |
|
3926 |
||
3927 |
// check if we need to remove trailing slashes |
|
3928 |
while ((options & QUrl::StripTrailingSlash) && url.endsWith('/')) |
|
3929 |
url.chop(1); |
|
3930 |
} |
|
3931 |
||
3932 |
if (!(options & QUrl::RemoveQuery) && hasQuery) { |
|
3933 |
url += '?'; |
|
3934 |
url += query; |
|
3935 |
} |
|
3936 |
if (!(options & QUrl::RemoveFragment) && hasFragment) { |
|
3937 |
url += '#'; |
|
3938 |
url += encodedFragment; |
|
3939 |
} |
|
3940 |
||
3941 |
return url; |
|
3942 |
} |
|
3943 |
||
3944 |
#define qToLower(ch) (((ch|32) >= 'a' && (ch|32) <= 'z') ? (ch|32) : ch) |
|
3945 |
||
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3946 |
const QByteArray &QUrlPrivate::normalized() const |
0 | 3947 |
{ |
3948 |
if (QURL_HASFLAG(stateFlags, QUrlPrivate::Normalized)) |
|
3949 |
return encodedNormalized; |
|
3950 |
||
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3951 |
QUrlPrivate *that = const_cast<QUrlPrivate *>(this); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3952 |
QURL_SETFLAG(that->stateFlags, QUrlPrivate::Normalized); |
0 | 3953 |
|
3954 |
QUrlPrivate tmp = *this; |
|
3955 |
tmp.scheme = tmp.scheme.toLower(); |
|
3956 |
tmp.host = tmp.canonicalHost(); |
|
3957 |
||
3958 |
// ensure the encoded and normalized parts of the URL |
|
3959 |
tmp.ensureEncodedParts(); |
|
3960 |
if (tmp.encodedUserName.contains('%')) |
|
3961 |
q_normalizePercentEncoding(&tmp.encodedUserName, userNameExcludeChars); |
|
3962 |
if (tmp.encodedPassword.contains('%')) |
|
3963 |
q_normalizePercentEncoding(&tmp.encodedPassword, passwordExcludeChars); |
|
3964 |
if (tmp.encodedFragment.contains('%')) |
|
3965 |
q_normalizePercentEncoding(&tmp.encodedFragment, fragmentExcludeChars); |
|
3966 |
||
3967 |
if (tmp.encodedPath.contains('%')) { |
|
3968 |
// the path is a bit special: |
|
3969 |
// the slashes shouldn't be encoded or decoded. |
|
3970 |
// They should remain exactly like they are right now |
|
3971 |
// |
|
3972 |
// treat the path as a slash-separated sequence of pchar |
|
3973 |
QByteArray result; |
|
3974 |
result.reserve(tmp.encodedPath.length()); |
|
3975 |
if (tmp.encodedPath.startsWith('/')) |
|
3976 |
result.append('/'); |
|
3977 |
||
3978 |
const char *data = tmp.encodedPath.constData(); |
|
3979 |
int lastSlash = 0; |
|
3980 |
int nextSlash; |
|
3981 |
do { |
|
3982 |
++lastSlash; |
|
3983 |
nextSlash = tmp.encodedPath.indexOf('/', lastSlash); |
|
3984 |
int len; |
|
3985 |
if (nextSlash == -1) |
|
3986 |
len = tmp.encodedPath.length() - lastSlash; |
|
3987 |
else |
|
3988 |
len = nextSlash - lastSlash; |
|
3989 |
||
3990 |
if (memchr(data + lastSlash, '%', len)) { |
|
3991 |
// there's at least one percent before the next slash |
|
3992 |
QByteArray block = QByteArray(data + lastSlash, len); |
|
3993 |
q_normalizePercentEncoding(&block, pathExcludeChars); |
|
3994 |
result.append(block); |
|
3995 |
} else { |
|
3996 |
// no percents in this path segment, append wholesale |
|
3997 |
result.append(data + lastSlash, len); |
|
3998 |
} |
|
3999 |
||
4000 |
// append the slash too, if it's there |
|
4001 |
if (nextSlash != -1) |
|
4002 |
result.append('/'); |
|
4003 |
||
4004 |
lastSlash = nextSlash; |
|
4005 |
} while (lastSlash != -1); |
|
4006 |
||
4007 |
tmp.encodedPath = result; |
|
4008 |
} |
|
4009 |
||
4010 |
if (!tmp.scheme.isEmpty()) // relative test |
|
4011 |
removeDotsFromPath(&tmp.encodedPath); |
|
4012 |
||
4013 |
int qLen = tmp.query.length(); |
|
4014 |
for (int i = 0; i < qLen; i++) { |
|
4015 |
if (qLen - i > 2 && tmp.query.at(i) == '%') { |
|
4016 |
++i; |
|
4017 |
tmp.query[i] = qToLower(tmp.query.at(i)); |
|
4018 |
++i; |
|
4019 |
tmp.query[i] = qToLower(tmp.query.at(i)); |
|
4020 |
} |
|
4021 |
} |
|
4022 |
encodedNormalized = tmp.toEncoded(); |
|
4023 |
||
4024 |
return encodedNormalized; |
|
4025 |
} |
|
4026 |
||
4027 |
QString QUrlPrivate::createErrorString() |
|
4028 |
{ |
|
4029 |
if (isValid) |
|
4030 |
return QString(); |
|
4031 |
||
4032 |
QString errorString(QLatin1String(QT_TRANSLATE_NOOP(QUrl, "Invalid URL \""))); |
|
4033 |
errorString += QLatin1String(encodedOriginal.constData()); |
|
4034 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, "\"")); |
|
4035 |
||
4036 |
if (errorInfo._source) { |
|
4037 |
int position = encodedOriginal.indexOf(errorInfo._source) - 1; |
|
4038 |
if (position > 0) { |
|
4039 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ": error at position ")); |
|
4040 |
errorString += QString::number(position); |
|
4041 |
} else { |
|
4042 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ": ")); |
|
4043 |
errorString += QLatin1String(errorInfo._source); |
|
4044 |
} |
|
4045 |
} |
|
4046 |
||
4047 |
if (errorInfo._expected) { |
|
4048 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ": expected \'")); |
|
4049 |
errorString += QLatin1Char(errorInfo._expected); |
|
4050 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, "\'")); |
|
4051 |
} else { |
|
4052 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ": ")); |
|
4053 |
errorString += QLatin1String(errorInfo._message); |
|
4054 |
} |
|
4055 |
if (errorInfo._found) { |
|
4056 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ", but found \'")); |
|
4057 |
errorString += QLatin1Char(errorInfo._found); |
|
4058 |
errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, "\'")); |
|
4059 |
} |
|
4060 |
return errorString; |
|
4061 |
} |
|
4062 |
||
4063 |
/*! |
|
4064 |
\macro QT_NO_URL_CAST_FROM_STRING |
|
4065 |
\relates QUrl |
|
4066 |
||
4067 |
Disables automatic conversions from QString (or char *) to QUrl. |
|
4068 |
||
4069 |
Compiling your code with this define is useful when you have a lot of |
|
4070 |
code that uses QString for file names and you wish to convert it to |
|
4071 |
use QUrl for network transparency. In any code that uses QUrl, it can |
|
4072 |
help avoid missing QUrl::resolved() calls, and other misuses of |
|
4073 |
QString to QUrl conversions. |
|
4074 |
||
4075 |
\oldcode |
|
4076 |
url = filename; // probably not what you want |
|
4077 |
\newcode |
|
4078 |
url = QUrl::fromLocalFile(filename); |
|
4079 |
url = baseurl.resolved(QUrl(filename)); |
|
4080 |
\endcode |
|
4081 |
||
4082 |
\sa QT_NO_CAST_FROM_ASCII |
|
4083 |
*/ |
|
4084 |
||
4085 |
||
4086 |
/*! |
|
4087 |
Constructs a URL by parsing \a url. \a url is assumed to be in human |
|
4088 |
readable representation, with no percent encoding. QUrl will automatically |
|
4089 |
percent encode all characters that are not allowed in a URL. |
|
4090 |
||
4091 |
Example: |
|
4092 |
||
4093 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 0 |
|
4094 |
||
4095 |
To construct a URL from an encoded string, call fromEncoded(): |
|
4096 |
||
4097 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 1 |
|
4098 |
||
4099 |
\sa setUrl(), setEncodedUrl(), fromEncoded(), TolerantMode |
|
4100 |
*/ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4101 |
QUrl::QUrl(const QString &url) : d(0) |
0 | 4102 |
{ |
4103 |
if (!url.isEmpty()) |
|
4104 |
setUrl(url); |
|
4105 |
} |
|
4106 |
||
4107 |
/*! |
|
4108 |
\overload |
|
4109 |
||
4110 |
Parses the \a url using the parser mode \a parsingMode. |
|
4111 |
||
4112 |
\sa setUrl() |
|
4113 |
*/ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4114 |
QUrl::QUrl(const QString &url, ParsingMode parsingMode) : d(0) |
0 | 4115 |
{ |
4116 |
if (!url.isEmpty()) |
|
4117 |
setUrl(url, parsingMode); |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4118 |
else { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4119 |
d = new QUrlPrivate; |
0 | 4120 |
d->parsingMode = parsingMode; |
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4121 |
} |
0 | 4122 |
} |
4123 |
||
4124 |
/*! |
|
4125 |
Constructs an empty QUrl object. |
|
4126 |
*/ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4127 |
QUrl::QUrl() : d(0) |
0 | 4128 |
{ |
4129 |
} |
|
4130 |
||
4131 |
/*! |
|
4132 |
Constructs a copy of \a other. |
|
4133 |
*/ |
|
4134 |
QUrl::QUrl(const QUrl &other) : d(other.d) |
|
4135 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4136 |
if (d) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4137 |
d->ref.ref(); |
0 | 4138 |
} |
4139 |
||
4140 |
/*! |
|
4141 |
Destructor; called immediately before the object is deleted. |
|
4142 |
*/ |
|
4143 |
QUrl::~QUrl() |
|
4144 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4145 |
if (d && !d->ref.deref()) |
0 | 4146 |
delete d; |
4147 |
} |
|
4148 |
||
4149 |
/*! |
|
4150 |
Returns true if the URL is valid; otherwise returns false. |
|
4151 |
||
4152 |
The URL is run through a conformance test. Every part of the URL |
|
4153 |
must conform to the standard encoding rules of the URI standard |
|
4154 |
for the URL to be reported as valid. |
|
4155 |
||
4156 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 2 |
|
4157 |
*/ |
|
4158 |
bool QUrl::isValid() const |
|
4159 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4160 |
if (!d) return false; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4161 |
|
0 | 4162 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4163 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Validated)) d->validate(); |
|
4164 |
||
4165 |
return d->isValid; |
|
4166 |
} |
|
4167 |
||
4168 |
/*! |
|
4169 |
Returns true if the URL has no data; otherwise returns false. |
|
4170 |
*/ |
|
4171 |
bool QUrl::isEmpty() const |
|
4172 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4173 |
if (!d) return true; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4174 |
|
0 | 4175 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) |
4176 |
return d->encodedOriginal.isEmpty(); |
|
4177 |
else |
|
4178 |
return d->scheme.isEmpty() // no encodedScheme |
|
4179 |
&& d->userName.isEmpty() && d->encodedUserName.isEmpty() |
|
4180 |
&& d->password.isEmpty() && d->encodedPassword.isEmpty() |
|
4181 |
&& d->host.isEmpty() // no encodedHost |
|
4182 |
&& d->port == -1 |
|
4183 |
&& d->path.isEmpty() && d->encodedPath.isEmpty() |
|
4184 |
&& d->query.isEmpty() |
|
4185 |
&& d->fragment.isEmpty() && d->encodedFragment.isEmpty(); |
|
4186 |
} |
|
4187 |
||
4188 |
/*! |
|
4189 |
Resets the content of the QUrl. After calling this function, the |
|
4190 |
QUrl is equal to one that has been constructed with the default |
|
4191 |
empty constructor. |
|
4192 |
*/ |
|
4193 |
void QUrl::clear() |
|
4194 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4195 |
if (d && !d->ref.deref()) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4196 |
delete d; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4197 |
d = 0; |
0 | 4198 |
} |
4199 |
||
4200 |
/*! |
|
4201 |
Constructs a URL by parsing the contents of \a url. |
|
4202 |
||
4203 |
\a url is assumed to be in unicode format, with no percent |
|
4204 |
encoding. |
|
4205 |
||
4206 |
Calling isValid() will tell whether or not a valid URL was |
|
4207 |
constructed. |
|
4208 |
||
4209 |
\sa setEncodedUrl() |
|
4210 |
*/ |
|
4211 |
void QUrl::setUrl(const QString &url) |
|
4212 |
{ |
|
4213 |
setUrl(url, TolerantMode); |
|
4214 |
} |
|
4215 |
||
4216 |
/*! |
|
4217 |
\overload |
|
4218 |
||
4219 |
Parses \a url using the parsing mode \a parsingMode. |
|
4220 |
||
4221 |
\sa setEncodedUrl() |
|
4222 |
*/ |
|
4223 |
void QUrl::setUrl(const QString &url, ParsingMode parsingMode) |
|
4224 |
{ |
|
4225 |
// escape all reserved characters and delimiters |
|
4226 |
// reserved = gen-delims / sub-delims |
|
4227 |
if (parsingMode != TolerantMode) { |
|
4228 |
setEncodedUrl(toPercentEncodingHelper(url, ABNF_reserved), parsingMode); |
|
4229 |
return; |
|
4230 |
} |
|
4231 |
||
4232 |
// Tolerant preprocessing |
|
4233 |
QString tmp = url; |
|
4234 |
||
4235 |
// Allow %20 in the QString variant |
|
4236 |
tmp.replace(QLatin1String("%20"), QLatin1String(" ")); |
|
4237 |
||
4238 |
// Percent-encode unsafe ASCII characters after host part |
|
4239 |
int start = tmp.indexOf(QLatin1String("//")); |
|
4240 |
if (start != -1) { |
|
4241 |
// Has host part, find delimiter |
|
4242 |
start += 2; // skip "//" |
|
4243 |
const char delims[] = "/#?"; |
|
4244 |
const char *d = delims; |
|
4245 |
int hostEnd = -1; |
|
4246 |
while (*d && (hostEnd = tmp.indexOf(QLatin1Char(*d), start)) == -1) |
|
4247 |
++d; |
|
4248 |
start = (hostEnd == -1) ? -1 : hostEnd + 1; |
|
4249 |
} else { |
|
4250 |
start = 0; // Has no host part |
|
4251 |
} |
|
4252 |
QByteArray encodedUrl; |
|
4253 |
if (start != -1) { |
|
4254 |
QString hostPart = tmp.left(start); |
|
4255 |
QString otherPart = tmp.mid(start); |
|
4256 |
encodedUrl = toPercentEncodingHelper(hostPart, ":/?#[]@!$&'()*+,;=") |
|
4257 |
+ toPercentEncodingHelper(otherPart, ":/?#@!$&'()*+,;="); |
|
4258 |
} else { |
|
4259 |
encodedUrl = toPercentEncodingHelper(tmp, ABNF_reserved); |
|
4260 |
} |
|
4261 |
setEncodedUrl(encodedUrl, StrictMode); |
|
4262 |
} |
|
4263 |
||
4264 |
/*! |
|
4265 |
Constructs a URL by parsing the contents of \a encodedUrl. |
|
4266 |
||
4267 |
\a encodedUrl is assumed to be a URL string in percent encoded |
|
4268 |
form, containing only ASCII characters. |
|
4269 |
||
4270 |
Use isValid() to determine if a valid URL was constructed. |
|
4271 |
||
4272 |
\sa setUrl() |
|
4273 |
*/ |
|
4274 |
void QUrl::setEncodedUrl(const QByteArray &encodedUrl) |
|
4275 |
{ |
|
4276 |
setEncodedUrl(encodedUrl, TolerantMode); |
|
4277 |
} |
|
4278 |
||
4279 |
inline static bool isHex(char c) |
|
4280 |
{ |
|
4281 |
c |= 0x20; |
|
4282 |
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f'); |
|
4283 |
} |
|
4284 |
||
4285 |
static inline char toHex(quint8 c) |
|
4286 |
{ |
|
4287 |
return c > 9 ? c - 10 + 'A' : c + '0'; |
|
4288 |
} |
|
4289 |
||
4290 |
/*! |
|
4291 |
Constructs a URL by parsing the contents of \a encodedUrl using |
|
4292 |
the given \a parsingMode. |
|
4293 |
*/ |
|
4294 |
void QUrl::setEncodedUrl(const QByteArray &encodedUrl, ParsingMode parsingMode) |
|
4295 |
{ |
|
4296 |
QByteArray tmp = encodedUrl; |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4297 |
if (!d) d = new QUrlPrivate; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4298 |
else d->clear(); |
0 | 4299 |
if ((d->parsingMode = parsingMode) == TolerantMode) { |
4300 |
// Replace stray % with %25 |
|
4301 |
QByteArray copy = tmp; |
|
4302 |
for (int i = 0, j = 0; i < copy.size(); ++i, ++j) { |
|
4303 |
if (copy.at(i) == '%') { |
|
4304 |
if (i + 2 >= copy.size() || !isHex(copy.at(i + 1)) || !isHex(copy.at(i + 2))) { |
|
4305 |
tmp.replace(j, 1, "%25"); |
|
4306 |
j += 2; |
|
4307 |
} |
|
4308 |
} |
|
4309 |
} |
|
4310 |
||
4311 |
// Find the host part |
|
4312 |
int hostStart = tmp.indexOf("//"); |
|
4313 |
int hostEnd = -1; |
|
4314 |
if (hostStart != -1) { |
|
4315 |
// Has host part, find delimiter |
|
4316 |
hostStart += 2; // skip "//" |
|
4317 |
hostEnd = tmp.indexOf('/', hostStart); |
|
4318 |
if (hostEnd == -1) |
|
4319 |
hostEnd = tmp.indexOf('#', hostStart); |
|
4320 |
if (hostEnd == -1) |
|
4321 |
hostEnd = tmp.indexOf('?'); |
|
4322 |
if (hostEnd == -1) |
|
4323 |
hostEnd = tmp.length() - 1; |
|
4324 |
} |
|
4325 |
||
4326 |
// Reserved and unreserved characters are fine |
|
4327 |
// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" |
|
4328 |
// reserved = gen-delims / sub-delims |
|
4329 |
// gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" |
|
4330 |
// sub-delims = "!" / "$" / "&" / "'" / "(" / ")" |
|
4331 |
// / "*" / "+" / "," / ";" / "=" |
|
4332 |
// Replace everything else with percent encoding |
|
4333 |
static const char doEncode[] = " \"<>[\\]^`{|}"; |
|
4334 |
static const char doEncodeHost[] = " \"<>\\^`{|}"; |
|
4335 |
for (int i = 0; i < tmp.size(); ++i) { |
|
4336 |
quint8 c = quint8(tmp.at(i)); |
|
4337 |
if (c < 32 || c > 127 || |
|
4338 |
strchr(hostStart <= i && i <= hostEnd ? doEncodeHost : doEncode, c)) { |
|
4339 |
char buf[4]; |
|
4340 |
buf[0] = '%'; |
|
4341 |
buf[1] = toHex(c >> 4); |
|
4342 |
buf[2] = toHex(c & 0xf); |
|
4343 |
buf[3] = '\0'; |
|
4344 |
tmp.replace(i, 1, buf); |
|
4345 |
i += 2; |
|
4346 |
} |
|
4347 |
} |
|
4348 |
} |
|
4349 |
||
4350 |
d->encodedOriginal = tmp; |
|
4351 |
} |
|
4352 |
||
4353 |
/*! |
|
4354 |
Sets the scheme of the URL to \a scheme. As a scheme can only |
|
4355 |
contain ASCII characters, no conversion or encoding is done on the |
|
4356 |
input. |
|
4357 |
||
4358 |
The scheme describes the type (or protocol) of the URL. It's |
|
4359 |
represented by one or more ASCII characters at the start the URL, |
|
4360 |
and is followed by a ':'. The following example shows a URL where |
|
4361 |
the scheme is "ftp": |
|
4362 |
||
4363 |
\img qurl-authority2.png |
|
4364 |
||
4365 |
The scheme can also be empty, in which case the URL is interpreted |
|
4366 |
as relative. |
|
4367 |
||
4368 |
\sa scheme(), isRelative() |
|
4369 |
*/ |
|
4370 |
void QUrl::setScheme(const QString &scheme) |
|
4371 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4372 |
if (!d) d = new QUrlPrivate; |
0 | 4373 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4374 |
detach(); |
|
4375 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4376 |
||
4377 |
d->scheme = scheme; |
|
4378 |
} |
|
4379 |
||
4380 |
/*! |
|
4381 |
Returns the scheme of the URL. If an empty string is returned, |
|
4382 |
this means the scheme is undefined and the URL is then relative. |
|
4383 |
||
4384 |
\sa setScheme(), isRelative() |
|
4385 |
*/ |
|
4386 |
QString QUrl::scheme() const |
|
4387 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4388 |
if (!d) return QString(); |
0 | 4389 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4390 |
||
4391 |
return d->scheme; |
|
4392 |
} |
|
4393 |
||
4394 |
/*! |
|
4395 |
Sets the authority of the URL to \a authority. |
|
4396 |
||
4397 |
The authority of a URL is the combination of user info, a host |
|
4398 |
name and a port. All of these elements are optional; an empty |
|
4399 |
authority is therefore valid. |
|
4400 |
||
4401 |
The user info and host are separated by a '@', and the host and |
|
4402 |
port are separated by a ':'. If the user info is empty, the '@' |
|
4403 |
must be omitted; although a stray ':' is permitted if the port is |
|
4404 |
empty. |
|
4405 |
||
4406 |
The following example shows a valid authority string: |
|
4407 |
||
4408 |
\img qurl-authority.png |
|
4409 |
*/ |
|
4410 |
void QUrl::setAuthority(const QString &authority) |
|
4411 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4412 |
if (!d) d = new QUrlPrivate; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4413 |
|
0 | 4414 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4415 |
detach(); |
|
4416 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4417 |
||
4418 |
d->setAuthority(authority); |
|
4419 |
} |
|
4420 |
||
4421 |
/*! |
|
4422 |
Returns the authority of the URL if it is defined; otherwise |
|
4423 |
an empty string is returned. |
|
4424 |
||
4425 |
\sa setAuthority() |
|
4426 |
*/ |
|
4427 |
QString QUrl::authority() const |
|
4428 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4429 |
if (!d) return QString(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4430 |
|
0 | 4431 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4432 |
||
4433 |
return d->authority(); |
|
4434 |
} |
|
4435 |
||
4436 |
/*! |
|
4437 |
Sets the user info of the URL to \a userInfo. The user info is an |
|
4438 |
optional part of the authority of the URL, as described in |
|
4439 |
setAuthority(). |
|
4440 |
||
4441 |
The user info consists of a user name and optionally a password, |
|
4442 |
separated by a ':'. If the password is empty, the colon must be |
|
4443 |
omitted. The following example shows a valid user info string: |
|
4444 |
||
4445 |
\img qurl-authority3.png |
|
4446 |
||
4447 |
\sa userInfo(), setUserName(), setPassword(), setAuthority() |
|
4448 |
*/ |
|
4449 |
void QUrl::setUserInfo(const QString &userInfo) |
|
4450 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4451 |
if (!d) d = new QUrlPrivate; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4452 |
|
0 | 4453 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4454 |
detach(); |
|
4455 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4456 |
||
4457 |
d->setUserInfo(userInfo.trimmed()); |
|
4458 |
} |
|
4459 |
||
4460 |
/*! |
|
4461 |
Returns the user info of the URL, or an empty string if the user |
|
4462 |
info is undefined. |
|
4463 |
*/ |
|
4464 |
QString QUrl::userInfo() const |
|
4465 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4466 |
if (!d) return QString(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4467 |
|
0 | 4468 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4469 |
||
4470 |
return d->userInfo(); |
|
4471 |
} |
|
4472 |
||
4473 |
/*! |
|
4474 |
Sets the URL's user name to \a userName. The \a userName is part |
|
4475 |
of the user info element in the authority of the URL, as described |
|
4476 |
in setUserInfo(). |
|
4477 |
||
4478 |
\sa setEncodedUserName(), userName(), setUserInfo() |
|
4479 |
*/ |
|
4480 |
void QUrl::setUserName(const QString &userName) |
|
4481 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4482 |
if (!d) d = new QUrlPrivate; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4483 |
|
0 | 4484 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4485 |
detach(); |
|
4486 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4487 |
||
4488 |
d->userName = userName; |
|
4489 |
d->encodedUserName.clear(); |
|
4490 |
} |
|
4491 |
||
4492 |
/*! |
|
4493 |
Returns the user name of the URL if it is defined; otherwise |
|
4494 |
an empty string is returned. |
|
4495 |
||
4496 |
\sa setUserName(), encodedUserName() |
|
4497 |
*/ |
|
4498 |
QString QUrl::userName() const |
|
4499 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4500 |
if (!d) return QString(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4501 |
|
0 | 4502 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4503 |
||
4504 |
d->userInfo(); // causes the unencoded form to be set |
|
4505 |
return d->userName; |
|
4506 |
} |
|
4507 |
||
4508 |
/*! |
|
4509 |
\since 4.4 |
|
4510 |
||
4511 |
Sets the URL's user name to the percent-encoded \a userName. The \a |
|
4512 |
userName is part of the user info element in the authority of the |
|
4513 |
URL, as described in setUserInfo(). |
|
4514 |
||
4515 |
Note: this function does not verify that \a userName is properly |
|
4516 |
encoded. It is the caller's responsibility to ensure that the any |
|
4517 |
delimiters (such as colons or slashes) are properly encoded. |
|
4518 |
||
4519 |
\sa setUserName(), encodedUserName(), setUserInfo() |
|
4520 |
*/ |
|
4521 |
void QUrl::setEncodedUserName(const QByteArray &userName) |
|
4522 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4523 |
if (!d) d = new QUrlPrivate; |
0 | 4524 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4525 |
detach(); |
|
4526 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4527 |
||
4528 |
d->encodedUserName = userName; |
|
4529 |
d->userName.clear(); |
|
4530 |
} |
|
4531 |
||
4532 |
/*! |
|
4533 |
\since 4.4 |
|
4534 |
||
4535 |
Returns the user name of the URL if it is defined; otherwise |
|
4536 |
an empty string is returned. The returned value will have its |
|
4537 |
non-ASCII and other control characters percent-encoded, as in |
|
4538 |
toEncoded(). |
|
4539 |
||
4540 |
\sa setEncodedUserName() |
|
4541 |
*/ |
|
4542 |
QByteArray QUrl::encodedUserName() const |
|
4543 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4544 |
if (!d) return QByteArray(); |
0 | 4545 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4546 |
||
4547 |
d->ensureEncodedParts(); |
|
4548 |
return d->encodedUserName; |
|
4549 |
} |
|
4550 |
||
4551 |
/*! |
|
4552 |
Sets the URL's password to \a password. The \a password is part of |
|
4553 |
the user info element in the authority of the URL, as described in |
|
4554 |
setUserInfo(). |
|
4555 |
||
4556 |
\sa password(), setUserInfo() |
|
4557 |
*/ |
|
4558 |
void QUrl::setPassword(const QString &password) |
|
4559 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4560 |
if (!d) d = new QUrlPrivate; |
0 | 4561 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4562 |
detach(); |
|
4563 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4564 |
||
4565 |
d->password = password; |
|
4566 |
d->encodedPassword.clear(); |
|
4567 |
} |
|
4568 |
||
4569 |
/*! |
|
4570 |
Returns the password of the URL if it is defined; otherwise |
|
4571 |
an empty string is returned. |
|
4572 |
||
4573 |
\sa setPassword() |
|
4574 |
*/ |
|
4575 |
QString QUrl::password() const |
|
4576 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4577 |
if (!d) return QString(); |
0 | 4578 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4579 |
||
4580 |
d->userInfo(); // causes the unencoded form to be set |
|
4581 |
return d->password; |
|
4582 |
} |
|
4583 |
||
4584 |
/*! |
|
4585 |
\since 4.4 |
|
4586 |
||
4587 |
Sets the URL's password to the percent-encoded \a password. The \a |
|
4588 |
password is part of the user info element in the authority of the |
|
4589 |
URL, as described in setUserInfo(). |
|
4590 |
||
4591 |
Note: this function does not verify that \a password is properly |
|
4592 |
encoded. It is the caller's responsibility to ensure that the any |
|
4593 |
delimiters (such as colons or slashes) are properly encoded. |
|
4594 |
||
4595 |
\sa setPassword(), encodedPassword(), setUserInfo() |
|
4596 |
*/ |
|
4597 |
void QUrl::setEncodedPassword(const QByteArray &password) |
|
4598 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4599 |
if (!d) d = new QUrlPrivate; |
0 | 4600 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4601 |
detach(); |
|
4602 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4603 |
||
4604 |
d->encodedPassword = password; |
|
4605 |
d->password.clear(); |
|
4606 |
} |
|
4607 |
||
4608 |
/*! |
|
4609 |
\since 4.4 |
|
4610 |
||
4611 |
Returns the password of the URL if it is defined; otherwise an |
|
4612 |
empty string is returned. The returned value will have its |
|
4613 |
non-ASCII and other control characters percent-encoded, as in |
|
4614 |
toEncoded(). |
|
4615 |
||
4616 |
\sa setEncodedPassword(), toEncoded() |
|
4617 |
*/ |
|
4618 |
QByteArray QUrl::encodedPassword() const |
|
4619 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4620 |
if (!d) return QByteArray(); |
0 | 4621 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4622 |
||
4623 |
d->ensureEncodedParts(); |
|
4624 |
return d->encodedPassword; |
|
4625 |
} |
|
4626 |
||
4627 |
/*! |
|
4628 |
Sets the host of the URL to \a host. The host is part of the |
|
4629 |
authority. |
|
4630 |
||
4631 |
\sa host(), setAuthority() |
|
4632 |
*/ |
|
4633 |
void QUrl::setHost(const QString &host) |
|
4634 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4635 |
if (!d) d = new QUrlPrivate; |
0 | 4636 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4637 |
detach(); |
|
4638 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized | QUrlPrivate::HostCanonicalized); |
|
4639 |
||
4640 |
d->host = host; |
|
4641 |
} |
|
4642 |
||
4643 |
/*! |
|
4644 |
Returns the host of the URL if it is defined; otherwise |
|
4645 |
an empty string is returned. |
|
4646 |
*/ |
|
4647 |
QString QUrl::host() const |
|
4648 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4649 |
if (!d) return QString(); |
0 | 4650 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4651 |
||
4652 |
if (d->host.isEmpty() || d->host.at(0) != QLatin1Char('[')) |
|
4653 |
return d->canonicalHost(); |
|
4654 |
QString tmp = d->host.mid(1); |
|
4655 |
tmp.truncate(tmp.length() - 1); |
|
4656 |
return tmp; |
|
4657 |
} |
|
4658 |
||
4659 |
/*! |
|
4660 |
\since 4.4 |
|
4661 |
||
4662 |
Sets the URL's host to the ACE- or percent-encoded \a host. The \a |
|
4663 |
host is part of the user info element in the authority of the |
|
4664 |
URL, as described in setAuthority(). |
|
4665 |
||
4666 |
\sa setHost(), encodedHost(), setAuthority(), fromAce() |
|
4667 |
*/ |
|
4668 |
void QUrl::setEncodedHost(const QByteArray &host) |
|
4669 |
{ |
|
4670 |
setHost(fromPercentEncodingHelper(host)); |
|
4671 |
} |
|
4672 |
||
4673 |
/*! |
|
4674 |
\since 4.4 |
|
4675 |
||
4676 |
Returns the host part of the URL if it is defined; otherwise |
|
4677 |
an empty string is returned. |
|
4678 |
||
4679 |
Note: encodedHost() does not return percent-encoded hostnames. Instead, |
|
4680 |
the ACE-encoded (bare ASCII in Punycode encoding) form will be |
|
4681 |
returned for any non-ASCII hostname. |
|
4682 |
||
4683 |
This function is equivalent to calling QUrl::toAce() on the return |
|
4684 |
value of host(). |
|
4685 |
||
4686 |
\sa setEncodedHost() |
|
4687 |
*/ |
|
4688 |
QByteArray QUrl::encodedHost() const |
|
4689 |
{ |
|
4690 |
// should we cache this in d->encodedHost? |
|
4691 |
return QUrl::toAce(host()); |
|
4692 |
} |
|
4693 |
||
4694 |
/*! |
|
4695 |
Sets the port of the URL to \a port. The port is part of the |
|
4696 |
authority of the URL, as described in setAuthority(). |
|
4697 |
||
4698 |
\a port must be between 0 and 65535 inclusive. Setting the |
|
4699 |
port to -1 indicates that the port is unspecified. |
|
4700 |
*/ |
|
4701 |
void QUrl::setPort(int port) |
|
4702 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4703 |
if (!d) d = new QUrlPrivate; |
0 | 4704 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4705 |
detach(); |
|
4706 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4707 |
||
4708 |
if (port < -1 || port > 65535) { |
|
4709 |
qWarning("QUrl::setPort: Out of range"); |
|
4710 |
port = -1; |
|
4711 |
} |
|
4712 |
||
4713 |
d->port = port; |
|
4714 |
} |
|
4715 |
||
4716 |
/*! |
|
4717 |
Returns the port of the URL, or -1 if the port is unspecified. |
|
4718 |
*/ |
|
4719 |
int QUrl::port() const |
|
4720 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4721 |
if (!d) return -1; |
0 | 4722 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4723 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Validated)) d->validate(); |
|
4724 |
return d->port; |
|
4725 |
} |
|
4726 |
||
4727 |
/*! |
|
4728 |
\overload |
|
4729 |
\since 4.1 |
|
4730 |
||
4731 |
Returns the port of the URL, or \a defaultPort if the port is |
|
4732 |
unspecified. |
|
4733 |
||
4734 |
Example: |
|
4735 |
||
4736 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 3 |
|
4737 |
*/ |
|
4738 |
int QUrl::port(int defaultPort) const |
|
4739 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4740 |
if (!d) return defaultPort; |
0 | 4741 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4742 |
return d->port == -1 ? defaultPort : d->port; |
|
4743 |
} |
|
4744 |
||
4745 |
/*! |
|
4746 |
Sets the path of the URL to \a path. The path is the part of the |
|
4747 |
URL that comes after the authority but before the query string. |
|
4748 |
||
4749 |
\img qurl-ftppath.png |
|
4750 |
||
4751 |
For non-hierarchical schemes, the path will be everything |
|
4752 |
following the scheme declaration, as in the following example: |
|
4753 |
||
4754 |
\img qurl-mailtopath.png |
|
4755 |
||
4756 |
\sa path() |
|
4757 |
*/ |
|
4758 |
void QUrl::setPath(const QString &path) |
|
4759 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4760 |
if (!d) d = new QUrlPrivate; |
0 | 4761 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4762 |
detach(); |
|
4763 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4764 |
||
4765 |
d->path = path; |
|
4766 |
d->encodedPath.clear(); |
|
4767 |
} |
|
4768 |
||
4769 |
/*! |
|
4770 |
Returns the path of the URL. |
|
4771 |
||
4772 |
\sa setPath() |
|
4773 |
*/ |
|
4774 |
QString QUrl::path() const |
|
4775 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4776 |
if (!d) return QString(); |
0 | 4777 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4778 |
||
4779 |
if (d->path.isNull()) { |
|
4780 |
QUrlPrivate *that = const_cast<QUrlPrivate *>(d); |
|
4781 |
that->path = fromPercentEncodingHelper(d->encodedPath); |
|
4782 |
} |
|
4783 |
return d->path; |
|
4784 |
} |
|
4785 |
||
4786 |
/*! |
|
4787 |
\since 4.4 |
|
4788 |
||
4789 |
Sets the URL's path to the percent-encoded \a path. The path is |
|
4790 |
the part of the URL that comes after the authority but before the |
|
4791 |
query string. |
|
4792 |
||
4793 |
\img qurl-ftppath.png |
|
4794 |
||
4795 |
For non-hierarchical schemes, the path will be everything |
|
4796 |
following the scheme declaration, as in the following example: |
|
4797 |
||
4798 |
\img qurl-mailtopath.png |
|
4799 |
||
4800 |
Note: this function does not verify that \a path is properly |
|
4801 |
encoded. It is the caller's responsibility to ensure that the any |
|
4802 |
delimiters (such as '?' and '#') are properly encoded. |
|
4803 |
||
4804 |
\sa setPath(), encodedPath(), setUserInfo() |
|
4805 |
*/ |
|
4806 |
void QUrl::setEncodedPath(const QByteArray &path) |
|
4807 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4808 |
if (!d) d = new QUrlPrivate; |
0 | 4809 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4810 |
detach(); |
|
4811 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4812 |
||
4813 |
d->encodedPath = path; |
|
4814 |
d->path.clear(); |
|
4815 |
} |
|
4816 |
||
4817 |
/*! |
|
4818 |
\since 4.4 |
|
4819 |
||
4820 |
Returns the path of the URL if it is defined; otherwise an |
|
4821 |
empty string is returned. The returned value will have its |
|
4822 |
non-ASCII and other control characters percent-encoded, as in |
|
4823 |
toEncoded(). |
|
4824 |
||
4825 |
\sa setEncodedPath(), toEncoded() |
|
4826 |
*/ |
|
4827 |
QByteArray QUrl::encodedPath() const |
|
4828 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4829 |
if (!d) return QByteArray(); |
0 | 4830 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4831 |
||
4832 |
d->ensureEncodedParts(); |
|
4833 |
return d->encodedPath; |
|
4834 |
} |
|
4835 |
||
4836 |
/*! |
|
4837 |
\since 4.2 |
|
4838 |
||
4839 |
Returns true if this URL contains a Query (i.e., if ? was seen on it). |
|
4840 |
||
4841 |
\sa hasQueryItem(), encodedQuery() |
|
4842 |
*/ |
|
4843 |
bool QUrl::hasQuery() const |
|
4844 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4845 |
if (!d) return false; |
0 | 4846 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4847 |
||
4848 |
return d->hasQuery; |
|
4849 |
} |
|
4850 |
||
4851 |
/*! |
|
4852 |
Sets the characters used for delimiting between keys and values, |
|
4853 |
and between key-value pairs in the URL's query string. The default |
|
4854 |
value delimiter is '=' and the default pair delimiter is '&'. |
|
4855 |
||
4856 |
\img qurl-querystring.png |
|
4857 |
||
4858 |
\a valueDelimiter will be used for separating keys from values, |
|
4859 |
and \a pairDelimiter will be used to separate key-value pairs. |
|
4860 |
Any occurrences of these delimiting characters in the encoded |
|
4861 |
representation of the keys and values of the query string are |
|
4862 |
percent encoded. |
|
4863 |
||
4864 |
If \a valueDelimiter is set to '-' and \a pairDelimiter is '/', |
|
4865 |
the above query string would instead be represented like this: |
|
4866 |
||
4867 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 4 |
|
4868 |
||
4869 |
Calling this function does not change the delimiters of the |
|
4870 |
current query string. It only affects queryItems(), |
|
4871 |
setQueryItems() and addQueryItems(). |
|
4872 |
*/ |
|
4873 |
void QUrl::setQueryDelimiters(char valueDelimiter, char pairDelimiter) |
|
4874 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4875 |
if (!d) d = new QUrlPrivate; |
0 | 4876 |
detach(); |
4877 |
||
4878 |
d->valueDelimiter = valueDelimiter; |
|
4879 |
d->pairDelimiter = pairDelimiter; |
|
4880 |
} |
|
4881 |
||
4882 |
/*! |
|
4883 |
Returns the character used to delimit between key-value pairs in |
|
4884 |
the query string of the URL. |
|
4885 |
*/ |
|
4886 |
char QUrl::queryPairDelimiter() const |
|
4887 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4888 |
if (!d) return '&'; |
0 | 4889 |
return d->pairDelimiter; |
4890 |
} |
|
4891 |
||
4892 |
/*! |
|
4893 |
Returns the character used to delimit between keys and values in |
|
4894 |
the query string of the URL. |
|
4895 |
*/ |
|
4896 |
char QUrl::queryValueDelimiter() const |
|
4897 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4898 |
if (!d) return '='; |
0 | 4899 |
return d->valueDelimiter; |
4900 |
} |
|
4901 |
||
4902 |
/*! |
|
4903 |
Sets the query string of the URL to \a query. The string is |
|
4904 |
inserted as-is, and no further encoding is performed when calling |
|
4905 |
toEncoded(). |
|
4906 |
||
4907 |
This function is useful if you need to pass a query string that |
|
4908 |
does not fit into the key-value pattern, or that uses a different |
|
4909 |
scheme for encoding special characters than what is suggested by |
|
4910 |
QUrl. |
|
4911 |
||
4912 |
Passing a value of QByteArray() to \a query (a null QByteArray) unsets |
|
4913 |
the query completely. However, passing a value of QByteArray("") |
|
4914 |
will set the query to an empty value, as if the original URL |
|
4915 |
had a lone "?". |
|
4916 |
||
4917 |
\sa encodedQuery(), hasQuery() |
|
4918 |
*/ |
|
4919 |
void QUrl::setEncodedQuery(const QByteArray &query) |
|
4920 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4921 |
if (!d) d = new QUrlPrivate; |
0 | 4922 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4923 |
detach(); |
|
4924 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
4925 |
||
4926 |
d->query = query; |
|
4927 |
d->hasQuery = !query.isNull(); |
|
4928 |
} |
|
4929 |
||
4930 |
/*! |
|
4931 |
Sets the query string of the URL to an encoded version of \a |
|
4932 |
query. The contents of \a query are converted to a string |
|
4933 |
internally, each pair delimited by the character returned by |
|
4934 |
pairDelimiter(), and the key and value are delimited by |
|
4935 |
valueDelimiter(). |
|
4936 |
||
4937 |
\sa setQueryDelimiters(), queryItems(), setEncodedQueryItems() |
|
4938 |
*/ |
|
4939 |
void QUrl::setQueryItems(const QList<QPair<QString, QString> > &query) |
|
4940 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4941 |
if (!d) d = new QUrlPrivate; |
0 | 4942 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4943 |
detach(); |
|
4944 |
||
4945 |
char alsoEncode[3]; |
|
4946 |
alsoEncode[0] = d->valueDelimiter; |
|
4947 |
alsoEncode[1] = d->pairDelimiter; |
|
4948 |
alsoEncode[2] = 0; |
|
4949 |
||
4950 |
QByteArray queryTmp; |
|
4951 |
for (int i = 0; i < query.size(); i++) { |
|
4952 |
if (i) queryTmp += d->pairDelimiter; |
|
4953 |
// query = *( pchar / "/" / "?" ) |
|
4954 |
queryTmp += toPercentEncodingHelper(query.at(i).first, queryExcludeChars, alsoEncode); |
|
4955 |
queryTmp += d->valueDelimiter; |
|
4956 |
// query = *( pchar / "/" / "?" ) |
|
4957 |
queryTmp += toPercentEncodingHelper(query.at(i).second, queryExcludeChars, alsoEncode); |
|
4958 |
} |
|
4959 |
||
4960 |
d->query = queryTmp; |
|
4961 |
d->hasQuery = !query.isEmpty(); |
|
4962 |
} |
|
4963 |
||
4964 |
/*! |
|
4965 |
\since 4.4 |
|
4966 |
||
4967 |
Sets the query string of the URL to the encoded version of \a |
|
4968 |
query. The contents of \a query are converted to a string |
|
4969 |
internally, each pair delimited by the character returned by |
|
4970 |
pairDelimiter(), and the key and value are delimited by |
|
4971 |
valueDelimiter(). |
|
4972 |
||
4973 |
Note: this function does not verify that the key-value pairs |
|
4974 |
are properly encoded. It is the caller's responsibility to ensure |
|
4975 |
that the query delimiters are properly encoded, if any. |
|
4976 |
||
4977 |
\sa setQueryDelimiters(), encodedQueryItems(), setQueryItems() |
|
4978 |
*/ |
|
4979 |
void QUrl::setEncodedQueryItems(const QList<QPair<QByteArray, QByteArray> > &query) |
|
4980 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
4981 |
if (!d) d = new QUrlPrivate; |
0 | 4982 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4983 |
detach(); |
|
4984 |
||
4985 |
QByteArray queryTmp; |
|
4986 |
for (int i = 0; i < query.size(); i++) { |
|
4987 |
if (i) queryTmp += d->pairDelimiter; |
|
4988 |
queryTmp += query.at(i).first; |
|
4989 |
queryTmp += d->valueDelimiter; |
|
4990 |
queryTmp += query.at(i).second; |
|
4991 |
} |
|
4992 |
||
4993 |
d->query = queryTmp; |
|
4994 |
d->hasQuery = !query.isEmpty(); |
|
4995 |
} |
|
4996 |
||
4997 |
/*! |
|
4998 |
Inserts the pair \a key = \a value into the query string of the |
|
4999 |
URL. |
|
5000 |
||
5001 |
The key/value pair is encoded before it is added to the query. The |
|
5002 |
pair is converted into separate strings internally. The \a key and |
|
5003 |
\a value is first encoded into UTF-8 and then delimited by the |
|
5004 |
character returned by valueDelimiter(). Each key/value pair is |
|
5005 |
delimited by the character returned by pairDelimiter(). |
|
5006 |
||
5007 |
\sa addEncodedQueryItem() |
|
5008 |
*/ |
|
5009 |
void QUrl::addQueryItem(const QString &key, const QString &value) |
|
5010 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5011 |
if (!d) d = new QUrlPrivate; |
0 | 5012 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5013 |
detach(); |
|
5014 |
||
5015 |
char alsoEncode[3]; |
|
5016 |
alsoEncode[0] = d->valueDelimiter; |
|
5017 |
alsoEncode[1] = d->pairDelimiter; |
|
5018 |
alsoEncode[2] = 0; |
|
5019 |
||
5020 |
if (!d->query.isEmpty()) |
|
5021 |
d->query += d->pairDelimiter; |
|
5022 |
||
5023 |
// query = *( pchar / "/" / "?" ) |
|
5024 |
d->query += toPercentEncodingHelper(key, queryExcludeChars, alsoEncode); |
|
5025 |
d->query += d->valueDelimiter; |
|
5026 |
// query = *( pchar / "/" / "?" ) |
|
5027 |
d->query += toPercentEncodingHelper(value, queryExcludeChars, alsoEncode); |
|
5028 |
||
5029 |
d->hasQuery = !d->query.isEmpty(); |
|
5030 |
} |
|
5031 |
||
5032 |
/*! |
|
5033 |
\since 4.4 |
|
5034 |
||
5035 |
Inserts the pair \a key = \a value into the query string of the |
|
5036 |
URL. |
|
5037 |
||
5038 |
Note: this function does not verify that either \a key or \a value |
|
5039 |
are properly encoded. It is the caller's responsibility to ensure |
|
5040 |
that the query delimiters are properly encoded, if any. |
|
5041 |
||
5042 |
\sa addQueryItem(), setQueryDelimiters() |
|
5043 |
*/ |
|
5044 |
void QUrl::addEncodedQueryItem(const QByteArray &key, const QByteArray &value) |
|
5045 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5046 |
if (!d) d = new QUrlPrivate; |
0 | 5047 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5048 |
detach(); |
|
5049 |
||
5050 |
if (!d->query.isEmpty()) |
|
5051 |
d->query += d->pairDelimiter; |
|
5052 |
||
5053 |
d->query += key; |
|
5054 |
d->query += d->valueDelimiter; |
|
5055 |
d->query += value; |
|
5056 |
||
5057 |
d->hasQuery = !d->query.isEmpty(); |
|
5058 |
} |
|
5059 |
||
5060 |
/*! |
|
5061 |
Returns the query string of the URL, as a map of keys and values. |
|
5062 |
||
5063 |
\sa setQueryItems(), setEncodedQuery() |
|
5064 |
*/ |
|
5065 |
QList<QPair<QString, QString> > QUrl::queryItems() const |
|
5066 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5067 |
if (!d) return QList<QPair<QString, QString> >(); |
0 | 5068 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5069 |
||
5070 |
QList<QPair<QString, QString> > itemMap; |
|
5071 |
||
5072 |
int pos = 0; |
|
5073 |
const char *query = d->query.constData(); |
|
5074 |
while (pos < d->query.size()) { |
|
5075 |
int valuedelim, end; |
|
5076 |
d->queryItem(pos, &valuedelim, &end); |
|
5077 |
QByteArray q(query + pos, valuedelim - pos); |
|
5078 |
if (valuedelim < end) { |
|
5079 |
QByteArray v(query + valuedelim + 1, end - valuedelim - 1); |
|
5080 |
itemMap += qMakePair(fromPercentEncodingMutable(&q), |
|
5081 |
fromPercentEncodingMutable(&v)); |
|
5082 |
} else { |
|
5083 |
itemMap += qMakePair(fromPercentEncodingMutable(&q), QString()); |
|
5084 |
} |
|
5085 |
pos = end + 1; |
|
5086 |
} |
|
5087 |
||
5088 |
return itemMap; |
|
5089 |
} |
|
5090 |
||
5091 |
/*! |
|
5092 |
\since 4.4 |
|
5093 |
||
5094 |
Returns the query string of the URL, as a map of encoded keys and values. |
|
5095 |
||
5096 |
\sa setEncodedQueryItems(), setQueryItems(), setEncodedQuery() |
|
5097 |
*/ |
|
5098 |
QList<QPair<QByteArray, QByteArray> > QUrl::encodedQueryItems() const |
|
5099 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5100 |
if (!d) return QList<QPair<QByteArray, QByteArray> >(); |
0 | 5101 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5102 |
||
5103 |
QList<QPair<QByteArray, QByteArray> > itemMap; |
|
5104 |
||
5105 |
int pos = 0; |
|
5106 |
const char *query = d->query.constData(); |
|
5107 |
while (pos < d->query.size()) { |
|
5108 |
int valuedelim, end; |
|
5109 |
d->queryItem(pos, &valuedelim, &end); |
|
5110 |
if (valuedelim < end) |
|
5111 |
itemMap += qMakePair(QByteArray(query + pos, valuedelim - pos), |
|
5112 |
QByteArray(query + valuedelim + 1, end - valuedelim - 1)); |
|
5113 |
else |
|
5114 |
itemMap += qMakePair(QByteArray(query + pos, valuedelim - pos), QByteArray()); |
|
5115 |
pos = end + 1; |
|
5116 |
} |
|
5117 |
||
5118 |
return itemMap; |
|
5119 |
} |
|
5120 |
||
5121 |
/*! |
|
5122 |
Returns true if there is a query string pair whose key is equal |
|
5123 |
to \a key from the URL. |
|
5124 |
||
5125 |
\sa hasEncodedQueryItem() |
|
5126 |
*/ |
|
5127 |
bool QUrl::hasQueryItem(const QString &key) const |
|
5128 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5129 |
if (!d) return false; |
0 | 5130 |
return hasEncodedQueryItem(toPercentEncoding(key, queryExcludeChars)); |
5131 |
} |
|
5132 |
||
5133 |
/*! |
|
5134 |
\since 4.4 |
|
5135 |
||
5136 |
Returns true if there is a query string pair whose key is equal |
|
5137 |
to \a key from the URL. |
|
5138 |
||
5139 |
Note: if the encoded \a key does not match the encoded version of |
|
5140 |
the query, this function will return false. That is, if the |
|
5141 |
encoded query of this URL is "search=Qt%20Rules", calling this |
|
5142 |
function with \a key = "%73earch" will return false. |
|
5143 |
||
5144 |
\sa hasQueryItem() |
|
5145 |
*/ |
|
5146 |
bool QUrl::hasEncodedQueryItem(const QByteArray &key) const |
|
5147 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5148 |
if (!d) return false; |
0 | 5149 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5150 |
||
5151 |
int pos = 0; |
|
5152 |
const char *query = d->query.constData(); |
|
5153 |
while (pos < d->query.size()) { |
|
5154 |
int valuedelim, end; |
|
5155 |
d->queryItem(pos, &valuedelim, &end); |
|
5156 |
if (key == QByteArray::fromRawData(query + pos, valuedelim - pos)) |
|
5157 |
return true; |
|
5158 |
pos = end + 1; |
|
5159 |
} |
|
5160 |
return false; |
|
5161 |
} |
|
5162 |
||
5163 |
/*! |
|
5164 |
Returns the first query string value whose key is equal to \a key |
|
5165 |
from the URL. |
|
5166 |
||
5167 |
\sa allQueryItemValues() |
|
5168 |
*/ |
|
5169 |
QString QUrl::queryItemValue(const QString &key) const |
|
5170 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5171 |
if (!d) return QString(); |
0 | 5172 |
QByteArray tmp = encodedQueryItemValue(toPercentEncoding(key, queryExcludeChars)); |
5173 |
return fromPercentEncodingMutable(&tmp); |
|
5174 |
} |
|
5175 |
||
5176 |
/*! |
|
5177 |
\since 4.4 |
|
5178 |
||
5179 |
Returns the first query string value whose key is equal to \a key |
|
5180 |
from the URL. |
|
5181 |
||
5182 |
Note: if the encoded \a key does not match the encoded version of |
|
5183 |
the query, this function will not work. That is, if the |
|
5184 |
encoded query of this URL is "search=Qt%20Rules", calling this |
|
5185 |
function with \a key = "%73earch" will return an empty string. |
|
5186 |
||
5187 |
\sa queryItemValue(), allQueryItemValues() |
|
5188 |
*/ |
|
5189 |
QByteArray QUrl::encodedQueryItemValue(const QByteArray &key) const |
|
5190 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5191 |
if (!d) return QByteArray(); |
0 | 5192 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5193 |
||
5194 |
int pos = 0; |
|
5195 |
const char *query = d->query.constData(); |
|
5196 |
while (pos < d->query.size()) { |
|
5197 |
int valuedelim, end; |
|
5198 |
d->queryItem(pos, &valuedelim, &end); |
|
5199 |
if (key == QByteArray::fromRawData(query + pos, valuedelim - pos)) |
|
5200 |
return valuedelim < end ? |
|
5201 |
QByteArray(query + valuedelim + 1, end - valuedelim - 1) : QByteArray(); |
|
5202 |
pos = end + 1; |
|
5203 |
} |
|
5204 |
return QByteArray(); |
|
5205 |
} |
|
5206 |
||
5207 |
/*! |
|
5208 |
Returns the a list of query string values whose key is equal to |
|
5209 |
\a key from the URL. |
|
5210 |
||
5211 |
\sa queryItemValue() |
|
5212 |
*/ |
|
5213 |
QStringList QUrl::allQueryItemValues(const QString &key) const |
|
5214 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5215 |
if (!d) return QStringList(); |
0 | 5216 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5217 |
||
5218 |
QByteArray encodedKey = toPercentEncoding(key, queryExcludeChars); |
|
5219 |
QStringList values; |
|
5220 |
||
5221 |
int pos = 0; |
|
5222 |
const char *query = d->query.constData(); |
|
5223 |
while (pos < d->query.size()) { |
|
5224 |
int valuedelim, end; |
|
5225 |
d->queryItem(pos, &valuedelim, &end); |
|
5226 |
if (encodedKey == QByteArray::fromRawData(query + pos, valuedelim - pos)) { |
|
5227 |
QByteArray v(query + valuedelim + 1, end - valuedelim - 1); |
|
5228 |
values += valuedelim < end ? |
|
5229 |
fromPercentEncodingMutable(&v) |
|
5230 |
: QString(); |
|
5231 |
} |
|
5232 |
pos = end + 1; |
|
5233 |
} |
|
5234 |
||
5235 |
return values; |
|
5236 |
} |
|
5237 |
||
5238 |
/*! |
|
5239 |
\since 4.4 |
|
5240 |
||
5241 |
Returns the a list of query string values whose key is equal to |
|
5242 |
\a key from the URL. |
|
5243 |
||
5244 |
Note: if the encoded \a key does not match the encoded version of |
|
5245 |
the query, this function will not work. That is, if the |
|
5246 |
encoded query of this URL is "search=Qt%20Rules", calling this |
|
5247 |
function with \a key = "%73earch" will return an empty list. |
|
5248 |
||
5249 |
\sa allQueryItemValues(), queryItemValue(), encodedQueryItemValue() |
|
5250 |
*/ |
|
5251 |
QList<QByteArray> QUrl::allEncodedQueryItemValues(const QByteArray &key) const |
|
5252 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5253 |
if (!d) return QList<QByteArray>(); |
0 | 5254 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5255 |
||
5256 |
QList<QByteArray> values; |
|
5257 |
||
5258 |
int pos = 0; |
|
5259 |
const char *query = d->query.constData(); |
|
5260 |
while (pos < d->query.size()) { |
|
5261 |
int valuedelim, end; |
|
5262 |
d->queryItem(pos, &valuedelim, &end); |
|
5263 |
if (key == QByteArray::fromRawData(query + pos, valuedelim - pos)) |
|
5264 |
values += valuedelim < end ? |
|
5265 |
QByteArray(query + valuedelim + 1, end - valuedelim - 1) |
|
5266 |
: QByteArray(); |
|
5267 |
pos = end + 1; |
|
5268 |
} |
|
5269 |
||
5270 |
return values; |
|
5271 |
} |
|
5272 |
||
5273 |
/*! |
|
5274 |
Removes the first query string pair whose key is equal to \a key |
|
5275 |
from the URL. |
|
5276 |
||
5277 |
\sa removeAllQueryItems() |
|
5278 |
*/ |
|
5279 |
void QUrl::removeQueryItem(const QString &key) |
|
5280 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5281 |
if (!d) return; |
0 | 5282 |
removeEncodedQueryItem(toPercentEncoding(key, queryExcludeChars)); |
5283 |
} |
|
5284 |
||
5285 |
/*! |
|
5286 |
\since 4.4 |
|
5287 |
||
5288 |
Removes the first query string pair whose key is equal to \a key |
|
5289 |
from the URL. |
|
5290 |
||
5291 |
Note: if the encoded \a key does not match the encoded version of |
|
5292 |
the query, this function will not work. That is, if the |
|
5293 |
encoded query of this URL is "search=Qt%20Rules", calling this |
|
5294 |
function with \a key = "%73earch" will do nothing. |
|
5295 |
||
5296 |
\sa removeQueryItem(), removeAllQueryItems() |
|
5297 |
*/ |
|
5298 |
void QUrl::removeEncodedQueryItem(const QByteArray &key) |
|
5299 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5300 |
if (!d) return; |
0 | 5301 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5302 |
detach(); |
|
5303 |
||
5304 |
int pos = 0; |
|
5305 |
const char *query = d->query.constData(); |
|
5306 |
while (pos < d->query.size()) { |
|
5307 |
int valuedelim, end; |
|
5308 |
d->queryItem(pos, &valuedelim, &end); |
|
5309 |
if (key == QByteArray::fromRawData(query + pos, valuedelim - pos)) { |
|
5310 |
if (end < d->query.size()) |
|
5311 |
++end; // remove additional '%' |
|
5312 |
d->query.remove(pos, end - pos); |
|
5313 |
return; |
|
5314 |
} |
|
5315 |
pos = end + 1; |
|
5316 |
} |
|
5317 |
} |
|
5318 |
||
5319 |
/*! |
|
5320 |
Removes all the query string pairs whose key is equal to \a key |
|
5321 |
from the URL. |
|
5322 |
||
5323 |
\sa removeQueryItem() |
|
5324 |
*/ |
|
5325 |
void QUrl::removeAllQueryItems(const QString &key) |
|
5326 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5327 |
if (!d) return; |
0 | 5328 |
removeAllEncodedQueryItems(toPercentEncoding(key, queryExcludeChars)); |
5329 |
} |
|
5330 |
||
5331 |
/*! |
|
5332 |
\since 4.4 |
|
5333 |
||
5334 |
Removes all the query string pairs whose key is equal to \a key |
|
5335 |
from the URL. |
|
5336 |
||
5337 |
Note: if the encoded \a key does not match the encoded version of |
|
5338 |
the query, this function will not work. That is, if the |
|
5339 |
encoded query of this URL is "search=Qt%20Rules", calling this |
|
5340 |
function with \a key = "%73earch" will do nothing. |
|
5341 |
||
5342 |
\sa removeQueryItem() |
|
5343 |
*/ |
|
5344 |
void QUrl::removeAllEncodedQueryItems(const QByteArray &key) |
|
5345 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5346 |
if (!d) return; |
0 | 5347 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5348 |
detach(); |
|
5349 |
||
5350 |
int pos = 0; |
|
5351 |
const char *query = d->query.constData(); |
|
5352 |
while (pos < d->query.size()) { |
|
5353 |
int valuedelim, end; |
|
5354 |
d->queryItem(pos, &valuedelim, &end); |
|
5355 |
if (key == QByteArray::fromRawData(query + pos, valuedelim - pos)) { |
|
5356 |
if (end < d->query.size()) |
|
5357 |
++end; // remove additional '%' |
|
5358 |
d->query.remove(pos, end - pos); |
|
5359 |
} else { |
|
5360 |
pos = end + 1; |
|
5361 |
} |
|
5362 |
} |
|
5363 |
} |
|
5364 |
||
5365 |
/*! |
|
5366 |
Returns the query string of the URL in percent encoded form. |
|
5367 |
*/ |
|
5368 |
QByteArray QUrl::encodedQuery() const |
|
5369 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5370 |
if (!d) return QByteArray(); |
0 | 5371 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5372 |
||
5373 |
return d->query; |
|
5374 |
} |
|
5375 |
||
5376 |
/*! |
|
5377 |
Sets the fragment of the URL to \a fragment. The fragment is the |
|
5378 |
last part of the URL, represented by a '#' followed by a string of |
|
5379 |
characters. It is typically used in HTTP for referring to a |
|
5380 |
certain link or point on a page: |
|
5381 |
||
5382 |
\img qurl-fragment.png |
|
5383 |
||
5384 |
The fragment is sometimes also referred to as the URL "reference". |
|
5385 |
||
5386 |
Passing an argument of QString() (a null QString) will unset the fragment. |
|
5387 |
Passing an argument of QString("") (an empty but not null QString) |
|
5388 |
will set the fragment to an empty string (as if the original URL |
|
5389 |
had a lone "#"). |
|
5390 |
||
5391 |
\sa fragment(), hasFragment() |
|
5392 |
*/ |
|
5393 |
void QUrl::setFragment(const QString &fragment) |
|
5394 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5395 |
if (!d) d = new QUrlPrivate; |
0 | 5396 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5397 |
detach(); |
|
5398 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
5399 |
||
5400 |
d->fragment = fragment; |
|
5401 |
d->hasFragment = !fragment.isNull(); |
|
5402 |
d->encodedFragment.clear(); |
|
5403 |
} |
|
5404 |
||
5405 |
/*! |
|
5406 |
Returns the fragment of the URL. |
|
5407 |
||
5408 |
\sa setFragment() |
|
5409 |
*/ |
|
5410 |
QString QUrl::fragment() const |
|
5411 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5412 |
if (!d) return QString(); |
0 | 5413 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5414 |
||
5415 |
if (d->fragment.isNull() && !d->encodedFragment.isNull()) { |
|
5416 |
QUrlPrivate *that = const_cast<QUrlPrivate *>(d); |
|
5417 |
that->fragment = fromPercentEncodingHelper(d->encodedFragment); |
|
5418 |
} |
|
5419 |
return d->fragment; |
|
5420 |
} |
|
5421 |
||
5422 |
/*! |
|
5423 |
\since 4.4 |
|
5424 |
||
5425 |
Sets the URL's fragment to the percent-encoded \a fragment. The fragment is the |
|
5426 |
last part of the URL, represented by a '#' followed by a string of |
|
5427 |
characters. It is typically used in HTTP for referring to a |
|
5428 |
certain link or point on a page: |
|
5429 |
||
5430 |
\img qurl-fragment.png |
|
5431 |
||
5432 |
The fragment is sometimes also referred to as the URL "reference". |
|
5433 |
||
5434 |
Passing an argument of QByteArray() (a null QByteArray) will unset |
|
5435 |
the fragment. Passing an argument of QByteArray("") (an empty but |
|
5436 |
not null QByteArray) will set the fragment to an empty string (as |
|
5437 |
if the original URL had a lone "#"). |
|
5438 |
||
5439 |
\sa setFragment(), encodedFragment() |
|
5440 |
*/ |
|
5441 |
void QUrl::setEncodedFragment(const QByteArray &fragment) |
|
5442 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5443 |
if (!d) d = new QUrlPrivate; |
0 | 5444 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5445 |
detach(); |
|
5446 |
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); |
|
5447 |
||
5448 |
d->encodedFragment = fragment; |
|
5449 |
d->hasFragment = !fragment.isNull(); |
|
5450 |
d->fragment.clear(); |
|
5451 |
} |
|
5452 |
||
5453 |
/*! |
|
5454 |
\since 4.4 |
|
5455 |
||
5456 |
Returns the fragment of the URL if it is defined; otherwise an |
|
5457 |
empty string is returned. The returned value will have its |
|
5458 |
non-ASCII and other control characters percent-encoded, as in |
|
5459 |
toEncoded(). |
|
5460 |
||
5461 |
\sa setEncodedFragment(), toEncoded() |
|
5462 |
*/ |
|
5463 |
QByteArray QUrl::encodedFragment() const |
|
5464 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5465 |
if (!d) return QByteArray(); |
0 | 5466 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5467 |
||
5468 |
d->ensureEncodedParts(); |
|
5469 |
return d->encodedFragment; |
|
5470 |
} |
|
5471 |
||
5472 |
/*! |
|
5473 |
\since 4.2 |
|
5474 |
||
5475 |
Returns true if this URL contains a fragment (i.e., if # was seen on it). |
|
5476 |
||
5477 |
\sa fragment(), setFragment() |
|
5478 |
*/ |
|
5479 |
bool QUrl::hasFragment() const |
|
5480 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5481 |
if (!d) return false; |
0 | 5482 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5483 |
||
5484 |
return d->hasFragment; |
|
5485 |
} |
|
5486 |
||
5487 |
/*! |
|
5488 |
Returns the result of the merge of this URL with \a relative. This |
|
5489 |
URL is used as a base to convert \a relative to an absolute URL. |
|
5490 |
||
5491 |
If \a relative is not a relative URL, this function will return \a |
|
5492 |
relative directly. Otherwise, the paths of the two URLs are |
|
5493 |
merged, and the new URL returned has the scheme and authority of |
|
5494 |
the base URL, but with the merged path, as in the following |
|
5495 |
example: |
|
5496 |
||
5497 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 5 |
|
5498 |
||
5499 |
Calling resolved() with ".." returns a QUrl whose directory is |
|
5500 |
one level higher than the original. Similarly, calling resolved() |
|
5501 |
with "../.." removes two levels from the path. If \a relative is |
|
5502 |
"/", the path becomes "/". |
|
5503 |
||
5504 |
\sa isRelative() |
|
5505 |
*/ |
|
5506 |
QUrl QUrl::resolved(const QUrl &relative) const |
|
5507 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5508 |
if (!d) return relative; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5509 |
if (!relative.d) return *this; |
0 | 5510 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5511 |
||
5512 |
if (!QURL_HASFLAG(relative.d->stateFlags, QUrlPrivate::Parsed)) |
|
5513 |
relative.d->parse(); |
|
5514 |
||
5515 |
d->ensureEncodedParts(); |
|
5516 |
relative.d->ensureEncodedParts(); |
|
5517 |
||
5518 |
QUrl t; |
|
5519 |
// be non strict and allow scheme in relative url |
|
5520 |
if (!relative.d->scheme.isEmpty() && relative.d->scheme != d->scheme) { |
|
5521 |
t = relative; |
|
5522 |
} else { |
|
5523 |
if (!relative.authority().isEmpty()) { |
|
5524 |
t = relative; |
|
5525 |
} else { |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5526 |
t.d = new QUrlPrivate; |
0 | 5527 |
if (relative.d->encodedPath.isEmpty()) { |
5528 |
t.d->encodedPath = d->encodedPath; |
|
5529 |
t.setEncodedQuery(relative.d->hasQuery ? relative.d->query : d->query); |
|
5530 |
} else { |
|
5531 |
t.d->encodedPath = relative.d->encodedPath.at(0) == '/' |
|
5532 |
? relative.d->encodedPath |
|
5533 |
: d->mergePaths(relative.d->encodedPath); |
|
5534 |
t.setEncodedQuery(relative.d->query); |
|
5535 |
} |
|
5536 |
t.d->encodedUserName = d->encodedUserName; |
|
5537 |
t.d->encodedPassword = d->encodedPassword; |
|
5538 |
t.d->host = d->host; |
|
5539 |
t.d->port = d->port; |
|
5540 |
} |
|
5541 |
t.setScheme(d->scheme); |
|
5542 |
} |
|
5543 |
t.setFragment(relative.fragment()); |
|
5544 |
removeDotsFromPath(&t.d->encodedPath); |
|
5545 |
t.d->path.clear(); |
|
5546 |
||
5547 |
return t; |
|
5548 |
} |
|
5549 |
||
5550 |
/*! |
|
5551 |
Returns true if the URL is relative; otherwise returns false. A |
|
5552 |
URL is relative if its scheme is undefined; this function is |
|
5553 |
therefore equivalent to calling scheme().isEmpty(). |
|
5554 |
*/ |
|
5555 |
bool QUrl::isRelative() const |
|
5556 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5557 |
if (!d) return true; |
0 | 5558 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5559 |
||
5560 |
return d->scheme.isEmpty(); |
|
5561 |
} |
|
5562 |
||
5563 |
/*! |
|
5564 |
Returns the human-displayable string representation of the |
|
5565 |
URL. The output can be customized by passing flags with \a |
|
5566 |
options. |
|
5567 |
||
5568 |
\sa FormattingOptions, toEncoded() |
|
5569 |
*/ |
|
5570 |
QString QUrl::toString(FormattingOptions options) const |
|
5571 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5572 |
if (!d) return QString(); |
0 | 5573 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5574 |
||
5575 |
QString url; |
|
5576 |
||
5577 |
if (!(options & QUrl::RemoveScheme) && !d->scheme.isEmpty()) |
|
5578 |
url += d->scheme + QLatin1Char(':'); |
|
5579 |
QString ourPath = path(); |
|
5580 |
if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority) { |
|
5581 |
bool doFileScheme = d->scheme == QLatin1String("file") && ourPath.startsWith(QLatin1Char('/')); |
|
5582 |
QString tmp = d->authority(options); |
|
5583 |
if (!tmp.isEmpty() || doFileScheme) { |
|
5584 |
if (doFileScheme && !ourPath.startsWith(QLatin1Char('/'))) |
|
5585 |
url += QLatin1Char('/'); |
|
5586 |
url += QLatin1String("//"); |
|
5587 |
url += tmp; |
|
5588 |
} |
|
5589 |
} |
|
5590 |
if (!(options & QUrl::RemovePath)) { |
|
5591 |
// check if we need to insert a slash |
|
5592 |
if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority |
|
5593 |
&& !d->authority(options).isEmpty() && !ourPath.isEmpty() && ourPath.at(0) != QLatin1Char('/')) |
|
5594 |
url += QLatin1Char('/'); |
|
5595 |
url += ourPath; |
|
5596 |
// check if we need to remove trailing slashes |
|
5597 |
while ((options & StripTrailingSlash) && url.endsWith(QLatin1Char('/'))) |
|
5598 |
url.chop(1); |
|
5599 |
} |
|
5600 |
||
5601 |
if (!(options & QUrl::RemoveQuery) && d->hasQuery) { |
|
5602 |
url += QLatin1Char('?'); |
|
5603 |
url += fromPercentEncoding(d->query); |
|
5604 |
} |
|
5605 |
if (!(options & QUrl::RemoveFragment) && d->hasFragment) { |
|
5606 |
url += QLatin1Char('#'); |
|
5607 |
url += fragment(); |
|
5608 |
} |
|
5609 |
||
5610 |
return url; |
|
5611 |
} |
|
5612 |
||
5613 |
/*! |
|
5614 |
Returns the encoded representation of the URL if it's valid; |
|
5615 |
otherwise an empty QByteArray is returned. The output can be |
|
5616 |
customized by passing flags with \a options. |
|
5617 |
||
5618 |
The user info, path and fragment are all converted to UTF-8, and |
|
5619 |
all non-ASCII characters are then percent encoded. The host name |
|
5620 |
is encoded using Punycode. |
|
5621 |
*/ |
|
5622 |
QByteArray QUrl::toEncoded(FormattingOptions options) const |
|
5623 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5624 |
if (!d) return QByteArray(); |
0 | 5625 |
return d->toEncoded(options); |
5626 |
} |
|
5627 |
||
5628 |
/*! |
|
5629 |
Parses \a input and returns the corresponding QUrl. \a input is |
|
5630 |
assumed to be in encoded form, containing only ASCII characters. |
|
5631 |
||
5632 |
The URL is parsed using TolerantMode. |
|
5633 |
||
5634 |
\sa toEncoded(), setUrl() |
|
5635 |
*/ |
|
5636 |
QUrl QUrl::fromEncoded(const QByteArray &input) |
|
5637 |
{ |
|
5638 |
QUrl tmp; |
|
5639 |
tmp.setEncodedUrl(input, TolerantMode); |
|
5640 |
return tmp; |
|
5641 |
} |
|
5642 |
||
5643 |
/*! |
|
5644 |
\overload |
|
5645 |
||
5646 |
Parses the URL using \a parsingMode. |
|
5647 |
||
5648 |
\sa toEncoded(), setUrl() |
|
5649 |
*/ |
|
5650 |
QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode parsingMode) |
|
5651 |
{ |
|
5652 |
QUrl tmp; |
|
5653 |
tmp.setEncodedUrl(input, parsingMode); |
|
5654 |
return tmp; |
|
5655 |
} |
|
5656 |
||
5657 |
/*! |
|
5658 |
Returns a decoded copy of \a input. \a input is first decoded from |
|
5659 |
percent encoding, then converted from UTF-8 to unicode. |
|
5660 |
*/ |
|
5661 |
QString QUrl::fromPercentEncoding(const QByteArray &input) |
|
5662 |
{ |
|
5663 |
return fromPercentEncodingHelper(input); |
|
5664 |
} |
|
5665 |
||
5666 |
/*! |
|
5667 |
Returns an encoded copy of \a input. \a input is first converted |
|
5668 |
to UTF-8, and all ASCII-characters that are not in the unreserved group |
|
5669 |
are percent encoded. To prevent characters from being percent encoded |
|
5670 |
pass them to \a exclude. To force characters to be percent encoded pass |
|
5671 |
them to \a include. |
|
5672 |
||
5673 |
Unreserved is defined as: |
|
5674 |
ALPHA / DIGIT / "-" / "." / "_" / "~" |
|
5675 |
||
5676 |
\snippet doc/src/snippets/code/src_corelib_io_qurl.cpp 6 |
|
5677 |
*/ |
|
5678 |
QByteArray QUrl::toPercentEncoding(const QString &input, const QByteArray &exclude, const QByteArray &include) |
|
5679 |
{ |
|
5680 |
return toPercentEncodingHelper(input, exclude.constData(), include.constData()); |
|
5681 |
} |
|
5682 |
||
5683 |
/*! |
|
5684 |
\obsolete |
|
5685 |
Returns a \a uc in Punycode encoding. |
|
5686 |
||
5687 |
Punycode is a Unicode encoding used for internationalized domain |
|
5688 |
names, as defined in RFC3492. If you want to convert a domain name from |
|
5689 |
Unicode to its ASCII-compatible representation, use toAce(). |
|
5690 |
*/ |
|
5691 |
QByteArray QUrl::toPunycode(const QString &uc) |
|
5692 |
{ |
|
5693 |
QString output; |
|
5694 |
toPunycodeHelper(uc.constData(), uc.size(), &output); |
|
5695 |
return output.toLatin1(); |
|
5696 |
} |
|
5697 |
||
5698 |
/*! |
|
5699 |
\obsolete |
|
5700 |
Returns the Punycode decoded representation of \a pc. |
|
5701 |
||
5702 |
Punycode is a Unicode encoding used for internationalized domain |
|
5703 |
names, as defined in RFC3492. If you want to convert a domain from |
|
5704 |
its ASCII-compatible encoding to the Unicode representation, use |
|
5705 |
fromAce(). |
|
5706 |
*/ |
|
5707 |
QString QUrl::fromPunycode(const QByteArray &pc) |
|
5708 |
{ |
|
5709 |
uint n = initial_n; |
|
5710 |
uint i = 0; |
|
5711 |
uint bias = initial_bias; |
|
5712 |
||
5713 |
// strip any ACE prefix |
|
5714 |
int start = pc.startsWith("xn--") ? 4 : 0; |
|
5715 |
if (!start) |
|
5716 |
return QString::fromLatin1(pc); |
|
5717 |
||
5718 |
// find the last delimiter character '-' in the input array. copy |
|
5719 |
// all data before this delimiter directly to the output array. |
|
5720 |
int delimiterPos = pc.lastIndexOf(0x2d); |
|
5721 |
QString output = delimiterPos < 4 ? |
|
5722 |
QString() : QString::fromLatin1(pc.constData() + start, delimiterPos - start); |
|
5723 |
||
5724 |
// if a delimiter was found, skip to the position after it; |
|
5725 |
// otherwise start at the front of the input string. everything |
|
5726 |
// before the delimiter is assumed to be basic code points. |
|
5727 |
uint cnt = delimiterPos + 1; |
|
5728 |
||
5729 |
// loop through the rest of the input string, inserting non-basic |
|
5730 |
// characters into output as we go. |
|
5731 |
while (cnt < (uint) pc.size()) { |
|
5732 |
uint oldi = i; |
|
5733 |
uint w = 1; |
|
5734 |
||
5735 |
// find the next index for inserting a non-basic character. |
|
5736 |
for (uint k = base; cnt < (uint) pc.size(); k += base) { |
|
5737 |
// grab a character from the punycode input and find its |
|
5738 |
// delta digit (each digit code is part of the |
|
5739 |
// variable-length integer delta) |
|
5740 |
uint digit = pc.at(cnt++); |
|
5741 |
if (digit - 48 < 10) digit -= 22; |
|
5742 |
else if (digit - 65 < 26) digit -= 65; |
|
5743 |
else if (digit - 97 < 26) digit -= 97; |
|
5744 |
else digit = base; |
|
5745 |
||
5746 |
// reject out of range digits |
|
5747 |
if (digit >= base || digit > (Q_MAXINT - i) / w) |
|
5748 |
return QLatin1String(""); |
|
5749 |
||
5750 |
i += (digit * w); |
|
5751 |
||
5752 |
// detect threshold to stop reading delta digits |
|
5753 |
uint t; |
|
5754 |
if (k <= bias) t = tmin; |
|
5755 |
else if (k >= bias + tmax) t = tmax; |
|
5756 |
else t = k - bias; |
|
5757 |
if (digit < t) break; |
|
5758 |
||
5759 |
w *= (base - t); |
|
5760 |
} |
|
5761 |
||
5762 |
// find new bias and calculate the next non-basic code |
|
5763 |
// character. |
|
5764 |
bias = adapt(i - oldi, output.length() + 1, oldi == 0); |
|
5765 |
n += i / (output.length() + 1); |
|
5766 |
||
5767 |
// allow the deltas to wrap around |
|
5768 |
i %= (output.length() + 1); |
|
5769 |
||
5770 |
// insert the character n at position i |
|
5771 |
output.insert((uint) i, QChar((ushort) n)); |
|
5772 |
++i; |
|
5773 |
} |
|
5774 |
||
5775 |
return output; |
|
5776 |
} |
|
5777 |
||
5778 |
/*! |
|
5779 |
\since 4.2 |
|
5780 |
||
5781 |
Returns the Unicode form of the given domain name |
|
5782 |
\a domain, which is encoded in the ASCII Compatible Encoding (ACE). |
|
5783 |
The result of this function is considered equivalent to \a domain. |
|
5784 |
||
5785 |
If the value in \a domain cannot be encoded, it will be converted |
|
5786 |
to QString and returned. |
|
5787 |
||
5788 |
The ASCII Compatible Encoding (ACE) is defined by RFC 3490, RFC 3491 |
|
5789 |
and RFC 3492. It is part of the Internationalizing Domain Names in |
|
5790 |
Applications (IDNA) specification, which allows for domain names |
|
5791 |
(like \c "example.com") to be written using international |
|
5792 |
characters. |
|
5793 |
*/ |
|
5794 |
QString QUrl::fromAce(const QByteArray &domain) |
|
5795 |
{ |
|
5796 |
return qt_ACE_do(QString::fromLatin1(domain), NormalizeAce); |
|
5797 |
} |
|
5798 |
||
5799 |
/*! |
|
5800 |
\since 4.2 |
|
5801 |
||
5802 |
Returns the ASCII Compatible Encoding of the given domain name \a domain. |
|
5803 |
The result of this function is considered equivalent to \a domain. |
|
5804 |
||
5805 |
The ASCII-Compatible Encoding (ACE) is defined by RFC 3490, RFC 3491 |
|
5806 |
and RFC 3492. It is part of the Internationalizing Domain Names in |
|
5807 |
Applications (IDNA) specification, which allows for domain names |
|
5808 |
(like \c "example.com") to be written using international |
|
5809 |
characters. |
|
5810 |
||
5811 |
This function return an empty QByteArra if \a domain is not a valid |
|
5812 |
hostname. Note, in particular, that IPv6 literals are not valid domain |
|
5813 |
names. |
|
5814 |
*/ |
|
5815 |
QByteArray QUrl::toAce(const QString &domain) |
|
5816 |
{ |
|
5817 |
QString result = qt_ACE_do(domain, ToAceOnly); |
|
5818 |
return result.toLatin1(); |
|
5819 |
} |
|
5820 |
||
5821 |
/*! |
|
5822 |
\since 4.2 |
|
5823 |
||
5824 |
Returns the current whitelist of top-level domains that are allowed |
|
5825 |
to have non-ASCII characters in their compositions. |
|
5826 |
||
5827 |
See setIdnWhitelist() for the rationale of this list. |
|
5828 |
*/ |
|
5829 |
QStringList QUrl::idnWhitelist() |
|
5830 |
{ |
|
5831 |
if (user_idn_whitelist) |
|
5832 |
return *user_idn_whitelist; |
|
5833 |
QStringList list; |
|
5834 |
unsigned int i = 0; |
|
5835 |
while (i < sizeof(idn_whitelist)/sizeof(const char *)) { |
|
5836 |
list << QLatin1String(idn_whitelist[i]); |
|
5837 |
++i; |
|
5838 |
} |
|
5839 |
return list; |
|
5840 |
} |
|
5841 |
||
5842 |
/*! |
|
5843 |
\since 4.2 |
|
5844 |
||
5845 |
Sets the whitelist of Top-Level Domains (TLDs) that are allowed to have |
|
5846 |
non-ASCII characters in domains to the value of \a list. |
|
5847 |
||
5848 |
Qt has comes a default list that contains the Internet top-level domains |
|
5849 |
that have published support for Internationalized Domain Names (IDNs) |
|
5850 |
and rules to guarantee that no deception can happen between similarly-looking |
|
5851 |
characters (such as the Latin lowercase letter \c 'a' and the Cyrillic |
|
5852 |
equivalent, which in most fonts are visually identical). |
|
5853 |
||
5854 |
This list is periodically maintained, as registrars publish new rules. |
|
5855 |
||
5856 |
This function is provided for those who need to manipulate the list, in |
|
5857 |
order to add or remove a TLD. It is not recommended to change its value |
|
5858 |
for purposes other than testing, as it may expose users to security risks. |
|
5859 |
*/ |
|
5860 |
void QUrl::setIdnWhitelist(const QStringList &list) |
|
5861 |
{ |
|
5862 |
if (!user_idn_whitelist) |
|
5863 |
user_idn_whitelist = new QStringList; |
|
5864 |
*user_idn_whitelist = list; |
|
5865 |
} |
|
5866 |
||
5867 |
/*! |
|
5868 |
\internal |
|
5869 |
||
5870 |
Returns true if this URL is "less than" the given \a url. This |
|
5871 |
provides a means of ordering URLs. |
|
5872 |
*/ |
|
5873 |
bool QUrl::operator <(const QUrl &url) const |
|
5874 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5875 |
if (!d) return url.d ? QByteArray() < url.d->normalized() : false; |
0 | 5876 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5877 |
if (!url.d) return d->normalized() < QByteArray(); |
0 | 5878 |
if (!QURL_HASFLAG(url.d->stateFlags, QUrlPrivate::Parsed)) url.d->parse(); |
5879 |
return d->normalized() < url.d->normalized(); |
|
5880 |
} |
|
5881 |
||
5882 |
/*! |
|
5883 |
Returns true if this URL and the given \a url are equal; |
|
5884 |
otherwise returns false. |
|
5885 |
*/ |
|
5886 |
bool QUrl::operator ==(const QUrl &url) const |
|
5887 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5888 |
if (!d) return url.isEmpty(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5889 |
if (!url.d) return isEmpty(); |
0 | 5890 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5891 |
if (!QURL_HASFLAG(url.d->stateFlags, QUrlPrivate::Parsed)) url.d->parse(); |
|
5892 |
return d->normalized() == url.d->normalized(); |
|
5893 |
} |
|
5894 |
||
5895 |
/*! |
|
5896 |
Returns true if this URL and the given \a url are not equal; |
|
5897 |
otherwise returns false. |
|
5898 |
*/ |
|
5899 |
bool QUrl::operator !=(const QUrl &url) const |
|
5900 |
{ |
|
5901 |
return !(*this == url); |
|
5902 |
} |
|
5903 |
||
5904 |
/*! |
|
5905 |
Assigns the specified \a url to this object. |
|
5906 |
*/ |
|
5907 |
QUrl &QUrl::operator =(const QUrl &url) |
|
5908 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5909 |
if (!d) { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5910 |
if (url.d) { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5911 |
url.d->ref.ref(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5912 |
d = url.d; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5913 |
} |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5914 |
} else { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5915 |
if (url.d) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5916 |
qAtomicAssign(d, url.d); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5917 |
else |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5918 |
clear(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5919 |
} |
0 | 5920 |
return *this; |
5921 |
} |
|
5922 |
||
5923 |
/*! |
|
5924 |
Assigns the specified \a url to this object. |
|
5925 |
*/ |
|
5926 |
QUrl &QUrl::operator =(const QString &url) |
|
5927 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5928 |
if (url.isEmpty()) { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5929 |
clear(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5930 |
} else { |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5931 |
QUrl tmp(url); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5932 |
if (!d) d = new QUrlPrivate; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5933 |
qAtomicAssign(d, tmp.d); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5934 |
} |
0 | 5935 |
return *this; |
5936 |
} |
|
5937 |
||
5938 |
/*! \internal |
|
5939 |
||
5940 |
Forces a detach. |
|
5941 |
*/ |
|
5942 |
void QUrl::detach() |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5943 |
{ |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5944 |
if (!d) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5945 |
d = new QUrlPrivate; |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5946 |
else |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5947 |
qAtomicDetach(d); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5948 |
} |
0 | 5949 |
|
5950 |
/*! |
|
5951 |
\internal |
|
5952 |
*/ |
|
5953 |
bool QUrl::isDetached() const |
|
5954 |
{ |
|
5
d3bac044e0f0
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
4
diff
changeset
|
5955 |
return !d || d->ref == 1; |
0 | 5956 |
} |
5957 |
||
5958 |
||
5959 |
/*! |
|
5960 |
Returns a QUrl representation of \a localFile, interpreted as a |
|
5961 |
local file. |
|
5962 |
||
5963 |
\sa toLocalFile() |
|
5964 |
*/ |
|
5965 |
QUrl QUrl::fromLocalFile(const QString &localFile) |
|
5966 |
{ |
|
5967 |
QUrl url; |
|
5968 |
url.setScheme(QLatin1String("file")); |
|
5969 |
QString deslashified = localFile; |
|
5970 |
deslashified.replace(QLatin1Char('\\'), QLatin1Char('/')); |
|
5971 |
||
5972 |
||
5973 |
||
5974 |
// magic for drives on windows |
|
5975 |
if (deslashified.length() > 1 && deslashified.at(1) == QLatin1Char(':') && deslashified.at(0) != QLatin1Char('/')) { |
|
5976 |
url.setPath(QLatin1Char('/') + deslashified); |
|
5977 |
// magic for shared drive on windows |
|
5978 |
} else if (deslashified.startsWith(QLatin1String("//"))) { |
|
5979 |
int indexOfPath = deslashified.indexOf(QLatin1Char('/'), 2); |
|
5980 |
url.setHost(deslashified.mid(2, indexOfPath - 2)); |
|
5981 |
if (indexOfPath > 2) |
|
5982 |
url.setPath(deslashified.right(deslashified.length() - indexOfPath)); |
|
5983 |
} else { |
|
5984 |
url.setPath(deslashified); |
|
5985 |
} |
|
5986 |
||
5987 |
return url; |
|
5988 |
} |
|
5989 |
||
5990 |
/*! |
|
5991 |
Returns the path of this URL formatted as a local file path. |
|
5992 |
||
5993 |
\sa fromLocalFile() |
|
5994 |
*/ |
|
5995 |
QString QUrl::toLocalFile() const |
|
5996 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
5997 |
if (!d) return QString(); |
0 | 5998 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
5999 |
||
6000 |
QString tmp; |
|
6001 |
QString ourPath = path(); |
|
6002 |
if (d->scheme.isEmpty() || QString::compare(d->scheme, QLatin1String("file"), Qt::CaseInsensitive) == 0) { |
|
6003 |
||
6004 |
// magic for shared drive on windows |
|
6005 |
if (!d->host.isEmpty()) { |
|
6006 |
tmp = QLatin1String("//") + d->host + (ourPath.length() > 0 && ourPath.at(0) != QLatin1Char('/') |
|
6007 |
? QLatin1Char('/') + ourPath : ourPath); |
|
6008 |
} else { |
|
6009 |
tmp = ourPath; |
|
6010 |
// magic for drives on windows |
|
6011 |
if (ourPath.length() > 2 && ourPath.at(0) == QLatin1Char('/') && ourPath.at(2) == QLatin1Char(':')) |
|
6012 |
tmp.remove(0, 1); |
|
6013 |
} |
|
6014 |
} |
|
6015 |
||
6016 |
return tmp; |
|
6017 |
} |
|
6018 |
||
6019 |
/*! |
|
6020 |
Returns true if this URL is a parent of \a childUrl. \a childUrl is a child |
|
6021 |
of this URL if the two URLs share the same scheme and authority, |
|
6022 |
and this URL's path is a parent of the path of \a childUrl. |
|
6023 |
*/ |
|
6024 |
bool QUrl::isParentOf(const QUrl &childUrl) const |
|
6025 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6026 |
QString childPath = childUrl.path(); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6027 |
|
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6028 |
if (!d) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6029 |
return ((childUrl.scheme().isEmpty()) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6030 |
&& (childUrl.authority().isEmpty()) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6031 |
&& childPath.length() > 0 && childPath.at(0) == QLatin1Char('/')); |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6032 |
|
0 | 6033 |
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); |
6034 |
||
6035 |
QString ourPath = path(); |
|
6036 |
||
6037 |
return ((childUrl.scheme().isEmpty() || d->scheme == childUrl.scheme()) |
|
6038 |
&& (childUrl.authority().isEmpty() || d->authority() == childUrl.authority()) |
|
6039 |
&& childPath.startsWith(ourPath) |
|
6040 |
&& ((ourPath.endsWith(QLatin1Char('/')) && childPath.length() > ourPath.length()) |
|
6041 |
|| (!ourPath.endsWith(QLatin1Char('/')) |
|
6042 |
&& childPath.length() > ourPath.length() && childPath.at(ourPath.length()) == QLatin1Char('/')))); |
|
6043 |
} |
|
6044 |
||
6045 |
/*! |
|
6046 |
\fn void QUrl::setProtocol(const QString &s) |
|
6047 |
||
6048 |
Use setScheme() instead. |
|
6049 |
*/ |
|
6050 |
||
6051 |
/*! |
|
6052 |
\fn void QUrl::setUser(const QString &s) |
|
6053 |
||
6054 |
Use setUserName() instead. |
|
6055 |
*/ |
|
6056 |
||
6057 |
/*! |
|
6058 |
\fn bool QUrl::hasUser() const |
|
6059 |
||
6060 |
Use !userName().isEmpty() instead. |
|
6061 |
*/ |
|
6062 |
||
6063 |
/*! |
|
6064 |
\fn bool QUrl::hasPassword() const |
|
6065 |
||
6066 |
Use !password().isEmpty() instead. |
|
6067 |
*/ |
|
6068 |
||
6069 |
/*! |
|
6070 |
\fn bool QUrl::hasHost() const |
|
6071 |
||
6072 |
Use !host().isEmpty() instead. |
|
6073 |
*/ |
|
6074 |
||
6075 |
/*! |
|
6076 |
\fn bool QUrl::hasPort() const |
|
6077 |
||
6078 |
Use port() != -1 instead. |
|
6079 |
*/ |
|
6080 |
||
6081 |
/*! |
|
6082 |
\fn bool QUrl::hasPath() const |
|
6083 |
||
6084 |
Use !path().isEmpty() instead. |
|
6085 |
*/ |
|
6086 |
||
6087 |
/*! |
|
6088 |
\fn void QUrl::setQuery(const QString &txt) |
|
6089 |
||
6090 |
Use setEncodedQuery() instead. |
|
6091 |
*/ |
|
6092 |
||
6093 |
/*! |
|
6094 |
\fn void QUrl::setRef(const QString &txt) |
|
6095 |
||
6096 |
Use setFragment() instead. |
|
6097 |
*/ |
|
6098 |
||
6099 |
/*! |
|
6100 |
\fn bool QUrl::hasRef() const |
|
6101 |
||
6102 |
Use !fragment().isEmpty() instead. |
|
6103 |
*/ |
|
6104 |
||
6105 |
/*! |
|
6106 |
\fn void QUrl::addPath(const QString &p) |
|
6107 |
||
6108 |
Use setPath() instead. |
|
6109 |
*/ |
|
6110 |
||
6111 |
/*! |
|
6112 |
\fn void QUrl::setFileName(const QString &txt) |
|
6113 |
||
6114 |
Use setPath() instead. |
|
6115 |
*/ |
|
6116 |
||
6117 |
/*! |
|
6118 |
\fn void QUrl::decode(QString &url) |
|
6119 |
||
6120 |
Use fromPercentEncoding() instead. |
|
6121 |
*/ |
|
6122 |
||
6123 |
/*! |
|
6124 |
\fn void QUrl::encode(QString &url) |
|
6125 |
||
6126 |
Use toPercentEncoding() instead. |
|
6127 |
*/ |
|
6128 |
||
6129 |
/*! |
|
6130 |
\fn bool QUrl::cdUp() |
|
6131 |
||
6132 |
Use resolved("..") instead. |
|
6133 |
||
6134 |
\oldcode |
|
6135 |
QUrl url("http://example.com/Developer/"); |
|
6136 |
url.cdUp(); |
|
6137 |
\newcode |
|
6138 |
QUrl url("http://example.com/Developer/"); |
|
6139 |
url = url.resolved(".."); |
|
6140 |
\endcode |
|
6141 |
*/ |
|
6142 |
||
6143 |
/*! |
|
6144 |
\fn bool QUrl::isRelativeUrl(const QString &url) |
|
6145 |
||
6146 |
Use isRelative() instead. |
|
6147 |
*/ |
|
6148 |
||
6149 |
/*! |
|
6150 |
\fn void QUrl::reset() |
|
6151 |
||
6152 |
Use clear() instead. |
|
6153 |
*/ |
|
6154 |
||
6155 |
/*! |
|
6156 |
\fn QUrl::operator QString() const |
|
6157 |
||
6158 |
Use toString() instead. |
|
6159 |
*/ |
|
6160 |
||
6161 |
/*! |
|
6162 |
\fn QString QUrl::protocol() const |
|
6163 |
||
6164 |
Use scheme() instead. |
|
6165 |
*/ |
|
6166 |
||
6167 |
/*! |
|
6168 |
\fn QString QUrl::user() const |
|
6169 |
||
6170 |
Use userName() instead. |
|
6171 |
*/ |
|
6172 |
||
6173 |
/*! |
|
6174 |
\fn QString QUrl::query() const |
|
6175 |
||
6176 |
Use encodedQuery() instead. |
|
6177 |
*/ |
|
6178 |
||
6179 |
/*! |
|
6180 |
\fn QString QUrl::ref() const |
|
6181 |
||
6182 |
Use fragment() instead. |
|
6183 |
*/ |
|
6184 |
||
6185 |
/*! |
|
6186 |
\fn QString QUrl::fileName() const |
|
6187 |
||
6188 |
Use QFileInfo(path()).fileName() instead. |
|
6189 |
*/ |
|
6190 |
||
6191 |
/*! |
|
6192 |
\fn QString QUrl::dirPath() const |
|
6193 |
||
6194 |
Use QFileInfo(path()).absolutePath() or QFileInfo(path()) instead. |
|
6195 |
*/ |
|
6196 |
||
6197 |
#ifdef QT3_SUPPORT |
|
6198 |
void QUrl::setFileName(const QString &txt) |
|
6199 |
{ |
|
6200 |
QFileInfo fileInfo(path()); |
|
6201 |
fileInfo.setFile(txt); |
|
6202 |
setPath(fileInfo.filePath()); |
|
6203 |
} |
|
6204 |
||
6205 |
QString QUrl::fileName() const |
|
6206 |
{ |
|
6207 |
QFileInfo fileInfo(path()); |
|
6208 |
return fileInfo.fileName(); |
|
6209 |
} |
|
6210 |
||
6211 |
QString QUrl::dirPath() const |
|
6212 |
{ |
|
6213 |
QFileInfo fileInfo(path()); |
|
6214 |
if (fileInfo.isAbsolute()) { |
|
6215 |
QString absPath = fileInfo.absolutePath(); |
|
6216 |
#ifdef Q_OS_WIN |
|
6217 |
if (absPath.size() > 1 && absPath.at(1) == QLatin1Char(':')) |
|
6218 |
absPath = absPath.mid(2); |
|
6219 |
#endif |
|
6220 |
return absPath; |
|
6221 |
} |
|
6222 |
return fileInfo.path(); |
|
6223 |
} |
|
6224 |
#endif |
|
6225 |
||
6226 |
||
6227 |
#ifndef QT_NO_DATASTREAM |
|
6228 |
/*! \relates QUrl |
|
6229 |
||
6230 |
Writes url \a url to the stream \a out and returns a reference |
|
6231 |
to the stream. |
|
6232 |
||
6233 |
\sa \link datastreamformat.html Format of the QDataStream operators \endlink |
|
6234 |
*/ |
|
6235 |
QDataStream &operator<<(QDataStream &out, const QUrl &url) |
|
6236 |
{ |
|
6237 |
QByteArray u = url.toEncoded(); |
|
6238 |
out << u; |
|
6239 |
return out; |
|
6240 |
} |
|
6241 |
||
6242 |
/*! \relates QUrl |
|
6243 |
||
6244 |
Reads a url into \a url from the stream \a in and returns a |
|
6245 |
reference to the stream. |
|
6246 |
||
6247 |
\sa \link datastreamformat.html Format of the QDataStream operators \endlink |
|
6248 |
*/ |
|
6249 |
QDataStream &operator>>(QDataStream &in, QUrl &url) |
|
6250 |
{ |
|
6251 |
QByteArray u; |
|
6252 |
in >> u; |
|
6253 |
url = QUrl::fromEncoded(u); |
|
6254 |
return in; |
|
6255 |
} |
|
6256 |
#endif // QT_NO_DATASTREAM |
|
6257 |
||
6258 |
#ifndef QT_NO_DEBUG_STREAM |
|
6259 |
QDebug operator<<(QDebug d, const QUrl &url) |
|
6260 |
{ |
|
6261 |
d.maybeSpace() << "QUrl(" << url.toString() << ')'; |
|
6262 |
return d.space(); |
|
6263 |
} |
|
6264 |
#endif |
|
6265 |
||
6266 |
/*! |
|
6267 |
\since 4.2 |
|
6268 |
||
6269 |
Returns a text string that explains why an URL is invalid in the case being; |
|
6270 |
otherwise returns an empty string. |
|
6271 |
*/ |
|
6272 |
QString QUrl::errorString() const |
|
6273 |
{ |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6274 |
if (!d) |
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
6275 |
return QLatin1String(QT_TRANSLATE_NOOP(QUrl, "Invalid URL \"\": ")); // XXX not a good message, but the one an empty URL produces |
0 | 6276 |
return d->createErrorString(); |
6277 |
} |
|
6278 |
||
6279 |
/*! |
|
6280 |
\typedef QUrl::DataPtr |
|
6281 |
\internal |
|
6282 |
*/ |
|
6283 |
||
6284 |
/*! |
|
6285 |
\fn DataPtr &QUrl::data_ptr() |
|
6286 |
\internal |
|
6287 |
*/ |
|
6288 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6289 |
// The following code has the following copyright: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6290 |
/* |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6291 |
Copyright (C) Research In Motion Limited 2009. All rights reserved. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6292 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6293 |
Redistribution and use in source and binary forms, with or without |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6294 |
modification, are permitted provided that the following conditions are met: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6295 |
* Redistributions of source code must retain the above copyright |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6296 |
notice, this list of conditions and the following disclaimer. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6297 |
* Redistributions in binary form must reproduce the above copyright |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6298 |
notice, this list of conditions and the following disclaimer in the |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6299 |
documentation and/or other materials provided with the distribution. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6300 |
* Neither the name of Research In Motion Limited nor the |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6301 |
names of its contributors may be used to endorse or promote products |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6302 |
derived from this software without specific prior written permission. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6303 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6304 |
THIS SOFTWARE IS PROVIDED BY Research In Motion Limited ''AS IS'' AND ANY |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6305 |
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6306 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6307 |
DISCLAIMED. IN NO EVENT SHALL Research In Motion Limited BE LIABLE FOR ANY |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6308 |
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6309 |
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6310 |
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6311 |
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6312 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6313 |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6314 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6315 |
*/ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6316 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6317 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6318 |
/*! |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6319 |
Returns a valid URL from a user supplied \a userInput string if one can be |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6320 |
deducted. In the case that is not possible, an invalid QUrl() is returned. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6321 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6322 |
\since 4.6 |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6323 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6324 |
Most applications that can browse the web, allow the user to input a URL |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6325 |
in the form of a plain string. This string can be manually typed into |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6326 |
a location bar, obtained from the clipboard, or passed in via command |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6327 |
line arguments. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6328 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6329 |
When the string is not already a valid URL, a best guess is performed, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6330 |
making various web related assumptions. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6331 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6332 |
In the case the string corresponds to a valid file path on the system, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6333 |
a file:// URL is constructed, using QUrl::fromLocalFile(). |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6334 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6335 |
If that is not the case, an attempt is made to turn the string into a |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6336 |
http:// or ftp:// URL. The latter in the case the string starts with |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6337 |
'ftp'. The result is then passed through QUrl's tolerant parser, and |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6338 |
in the case or success, a valid QUrl is returned, or else a QUrl(). |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6339 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6340 |
\section1 Examples: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6341 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6342 |
\list |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6343 |
\o qt.nokia.com becomes http://qt.nokia.com |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6344 |
\o ftp.qt.nokia.com becomes ftp://ftp.qt.nokia.com |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6345 |
\o hostname becomes http://hostname |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6346 |
\o /home/user/test.html becomes file:///home/user/test.html |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6347 |
\endlist |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6348 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6349 |
\section2 Tips to avoid erroneous character conversion when dealing with |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6350 |
URLs and strings: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6351 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6352 |
\list |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6353 |
\o When creating an URL QString from a QByteArray or a char*, always use |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6354 |
QString::fromUtf8(). |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6355 |
\o Favor the use of QUrl::fromEncoded() and QUrl::toEncoded() instead of |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6356 |
QUrl(string) and QUrl::toString() when converting QUrl to/from string. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6357 |
\endlist |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6358 |
*/ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6359 |
QUrl QUrl::fromUserInput(const QString &userInput) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6360 |
{ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6361 |
QString trimmedString = userInput.trimmed(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6362 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6363 |
// Check first for files, since on Windows drive letters can be interpretted as schemes |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6364 |
if (QDir::isAbsolutePath(trimmedString)) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6365 |
return QUrl::fromLocalFile(trimmedString); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6366 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6367 |
QUrl url = QUrl::fromEncoded(trimmedString.toUtf8(), QUrl::TolerantMode); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6368 |
QUrl urlPrepended = QUrl::fromEncoded((QLatin1String("http://") + trimmedString).toUtf8(), QUrl::TolerantMode); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6369 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6370 |
// Check the most common case of a valid url with scheme and host |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6371 |
// We check if the port would be valid by adding the scheme to handle the case host:port |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6372 |
// where the host would be interpretted as the scheme |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6373 |
if (url.isValid() |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6374 |
&& !url.scheme().isEmpty() |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6375 |
&& (!url.host().isEmpty() || !url.path().isEmpty()) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6376 |
&& urlPrepended.port() == -1) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6377 |
return url; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6378 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6379 |
// Else, try the prepended one and adjust the scheme from the host name |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6380 |
if (urlPrepended.isValid() && (!urlPrepended.host().isEmpty() || !urlPrepended.path().isEmpty())) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6381 |
{ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6382 |
int dotIndex = trimmedString.indexOf(QLatin1Char('.')); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6383 |
const QString hostscheme = trimmedString.left(dotIndex).toLower(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6384 |
if (hostscheme == QLatin1String("ftp")) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6385 |
urlPrepended.setScheme(QLatin1String("ftp")); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6386 |
return urlPrepended; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6387 |
} |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6388 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6389 |
return QUrl(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6390 |
} |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6391 |
// end of BSD code |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6392 |
|
0 | 6393 |
QT_END_NAMESPACE |