|
|
|
что выбрать CString или string ??
|
|||
|---|---|---|---|
|
#18+
grieg wrote: > Не понял, что именно ты спрашиваешь? > Будут ли у QString (Qt) проблемы с кодировками? Я не спрашиваю, я предлагаю. The QString class provides a Unicode character string. QString stores a string of 16-bit QChars, where each QChar corresponds one Unicode 4.0 character. (Unicode characters with code values above 65535 are stored using surrogate pairs, i.e., two consecutive QChars.) Unicode is an international standard that supports most of the writing systems in use today. It is a superset of ASCII and Latin-1 (ISO 8859-1), and all the ASCII/Latin-1 characters are available at the same code positions. Behind the scenes, QString uses implicit sharing (copy-on-write) to reduce memory usage and to avoid the needless copying of data. This also helps reduce the inherent overhead of storing 16-bit characters instead of 8-bit characters. Насчет кодировок - есть кодеки для конвертирования текста, я с ними обильно не общался. Как я понимаю, вас интересуют: int compare ( const QLatin1String & s1, const QString & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) QString fromAscii ( const char * str, int size = -1 ) QString fromLatin1 ( const char * str, int size = -1 ) QString fromLocal8Bit ( const char * str, int size = -1 ) QString fromRawData ( const QChar * unicode, int size ) QString fromStdString ( const std::string & str ) QString fromStdWString ( const std::wstring & str ) QString fromUcs4 ( const uint * unicode, int size = -1 ) QString fromUtf8 ( const char * str, int size = -1 ) QString fromUtf16 ( const ushort * unicode, int size = -1 ) QString fromWCharArray ( const wchar_t * string, int size = -1 ) Примеры для работы с кодировками были где-то в демках. Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2007, 01:42:24 |
|
||
|
|

start [/forum/topic.php?fid=57&gotonew=1&tid=2028056]: |
0ms |
get settings: |
5ms |
get forum list: |
9ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
192ms |
get topic data: |
7ms |
get first new msg: |
4ms |
get forum data: |
2ms |
get page messages: |
29ms |
get tp. blocked users: |
1ms |
| others: | 209ms |
| total: | 462ms |

| 0 / 0 |
