QTextEncoder(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

✨ 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 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