QTextEncoder(3qt)
β¨ QTextEncoder π (that's QTextEncoder(3qt) bestie, from the Qt 3 manual pages π)
πΈ NAME πΈ
QTextEncoder β it's a state-based encoder, no cap π
π¦ SYNOPSIS π¦
Okay so real talk: every single function in this class is reentrant when Qt is built with thread support β¨ That's the whole vibe.
#include <qtextcodec.h>
π Public Members π
virtual ~QTextEncoder ()
virtual QCString fromUnicode ( const QString & uc, int & lenInOut ) = 0
π DESCRIPTION π
So like. The QTextEncoder class provides a state-based encoder. That's literally its whole job and it ate π
What it does: it converts Unicode into another format, and β this is the iconic part β it remembers any state that's required between calls π§ β¨ Like it's keeping receipts but for encoding. Main character energy fr fr.
See also QTextCodec::makeEncoder() and Internationalization with Qt. π«Ά
π MEMBER FUNCTION DOCUMENTATION π
π QTextEncoder::~QTextEncoder () [virtual]
Destroys the encoder. Rip boo, you did great ππΈ
β QCString QTextEncoder::fromUnicode ( const QString & uc, int & lenInOut ) [pure virtual]
Converts lenInOut characters (and yes bestie, characters, NOT bytes β this is the trap everyone falls into π) from uc, producing a QCString.
Then lenInOut gets set to the length of the result (in bytes) β¨ so heads up, the number you put in is characters and the number you get back is bytes. Not the same thing. Not even a little. π
And here's the slay part: the encoder is free to record state to use when subsequent calls are made to this function. Like for example, it might change modes with escape sequences if needed during the encoding of one string, then assume that mode applies when a subsequent call begins π That's the whole "state-based" thing, iykyk.
π₯ SEE ALSO π₯
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. π
πΈ AUTHOR πΈ
Generated automatically from the source code. (Yes bestie, a robot wrote it, we love a machine-made moment π€β¨)
π¦ BUGS π¦
Found a bug in Qt? Please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. π«Ά (Seriously, good bug reports are a love language.)
The definitive Qt documentation is provided in HTML format; it's located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. π
Found errors in this manual page? Report them to qt-bugs@trolltech.com. Please include the name of the manual page (qtextencoder.3qt) and the Qt version (3.3.8). Include both, don't be shy, they literally asked π
And that's the whole page bestie β brought to you by Trolltech AS, dated 2 February 2007, living in the Qt 3.3.8 era πβ¨ QTextEncoder(3qt) out. Periodt. π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms