QTextDecoder 類提供基於狀態的解碼器。 更多...
| 頭: | #include <QTextDecoder> |
| qmake: | QT += core |
注意: 此類的所有函數 可重入 .
| QTextDecoder (const QTextCodec * codec , QTextCodec::ConversionFlags flags ) | |
| QTextDecoder (const QTextCodec * codec ) | |
| ~QTextDecoder () | |
| QString | toUnicode (const char * chars , int len ) |
| QString | toUnicode (const QByteArray & ba ) |
| void | toUnicode (QString * target , const char * chars , int len ) |
文本解碼器使用特定編解碼器,將文本從編碼文本格式轉換成 Unicode。
解碼器將在此格式的文本轉換成 Unicode,記住:在調用之間要求任何狀態。
另請參閱 QTextCodec::makeDecoder () 和 QTextEncoder .
構造文本解碼器為給定 codec 和轉換 flags .
該函數在 Qt 4.7 引入。
構造文本解碼器為給定 codec .
銷毀解碼器。
轉換第一 len 字節在 chars 到 Unicode,返迴結果。
若未使用所有字符 (如:若僅部分多字節編碼位於字符末尾),解碼器將記住足夠狀態以繼續此函數的下一調用。
這是重載函數。
轉換在字節數組中的字節指定通過 ba 到 Unicode 並返迴結果。
這是重載函數。
返迴的轉換字符串在 target .