QTextDecoder Class
QTextDecoder 클래스는 상태 기반 디코더를 제공합니다. 더 보기...
Header: | #include <QTextDecoder> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core5Compat) target_link_libraries(mytarget PRIVATE Qt6::Core5Compat) |
qmake: | QT += core5compat |
참고: 이 클래스의 모든 함수는 재진입합니다.
공용 함수
QTextDecoder(const QTextCodec *codec) | |
QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags) | |
~QTextDecoder() | |
QString | toUnicode(const char *chars, int len) |
QString | toUnicode(const QByteArray &ba) |
void | toUnicode(QString *target, const char *chars, int len) |
상세 설명
텍스트 디코더는 특정 코덱을 사용하여 인코딩된 텍스트 형식의 텍스트를 유니코드로 변환합니다.
디코더는 호출 사이에 필요한 모든 상태를 기억하면서 이 형식의 텍스트를 유니코드로 변환합니다.
QTextCodec::makeDecoder() 및 QTextEncoder 을참조하세요 .
멤버 함수 문서
[explicit]
QTextDecoder::QTextDecoder(const QTextCodec *codec)
주어진 codec 에 대한 텍스트 디코더를 구축합니다.
[explicit]
QTextDecoder::QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)
주어진 codec 및 변환 flags 에 대한 텍스트 디코더를 구축합니다.
[noexcept]
QTextDecoder::~QTextDecoder()
디코더를 파괴합니다.
QString QTextDecoder::toUnicode(const char *chars, int len)
chars 의 첫 번째 len 바이트를 유니코드로 변환하여 결과를 반환합니다.
모든 문자가 사용되지 않은 경우(예: 멀티바이트 인코딩의 일부만 문자 끝에 있는 경우) 디코더는 이 함수의 다음 호출을 계속할 수 있는 충분한 상태를 기억합니다.
QString QTextDecoder::toUnicode(const QByteArray &ba)
이 함수는 오버로드된 함수입니다.
ba 에 지정된 바이트 배열의 바이트를 유니코드로 변환하고 결과를 반환합니다.
void QTextDecoder::toUnicode(QString *target, const char *chars, int len)
이것은 오버로드된 함수입니다.
변환된 문자열은 target 으로 반환됩니다.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.