diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-06-08 12:56:43 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-06-08 12:56:43 +0900 |
commit | 0cf411b09cf5d8970b873a338a69eae98d5ce5d8 (patch) | |
tree | 107cf55759cc3138bb1e0035b479bcd92127403a /doc/man/man3/tqtextcodec.3qt | |
parent | e6077c30d14e9d662e8843c554db86c0d366d0b6 (diff) | |
download | tqt3-0cf411b09cf5d8970b873a338a69eae98d5ce5d8.tar.gz tqt3-0cf411b09cf5d8970b873a338a69eae98d5ce5d8.zip |
Rename text nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/man/man3/tqtextcodec.3qt')
-rw-r--r-- | doc/man/man3/tqtextcodec.3qt | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/doc/man/man3/tqtextcodec.3qt b/doc/man/man3/tqtextcodec.3qt index a16d0059d..25beae66b 100644 --- a/doc/man/man3/tqtextcodec.3qt +++ b/doc/man/man3/tqtextcodec.3qt @@ -1,5 +1,5 @@ '\" t -.TH QTextCodec 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQTextCodec 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,18 +7,18 @@ .ad l .nh .SH NAME -QTextCodec \- Conversion between text encodings +TQTextCodec \- Conversion between text encodings .SH SYNOPSIS -Almost all the functions in this class are reentrant when TQt is built with thread support. The exceptions are \fB~QTextCodec\fR(), \fBsetCodecForTr\fR(), \fBsetCodecForCStrings\fR(), and \fBQTextCodec\fR(). </p> +Almost all the functions in this class are reentrant when TQt is built with thread support. The exceptions are \fB~TQTextCodec\fR(), \fBsetCodecForTr\fR(), \fBsetCodecForCStrings\fR(), and \fBTQTextCodec\fR(). </p> .PP -\fC#include <ntqtextcodec.h>\fR +\fC#include <tqtextcodec.h>\fR .PP Inherited by QBig5Codec, QBig5hkscsCodec, QEucJpCodec, QEucKrCodec, QGb18030Codec, QJisCodec, QHebrewCodec, QSjisCodec, and QTsciiCodec. .PP .SS "Public Members" .in +1c .ti -1c -.BI "virtual \fB~QTextCodec\fR ()" +.BI "virtual \fB~TQTextCodec\fR ()" .br .ti -1c .BI "virtual const char * \fBname\fR () const = 0" @@ -30,10 +30,10 @@ Inherited by QBig5Codec, QBig5hkscsCodec, QEucJpCodec, QEucKrCodec, QGb18030Code .BI "virtual int \fBmibEnum\fR () const = 0" .br .ti -1c -.BI "virtual QTextDecoder * \fBmakeDecoder\fR () const" +.BI "virtual TQTextDecoder * \fBmakeDecoder\fR () const" .br .ti -1c -.BI "virtual QTextEncoder * \fBmakeEncoder\fR () const" +.BI "virtual TQTextEncoder * \fBmakeEncoder\fR () const" .br .ti -1c .BI "virtual TQString \fBtoUnicode\fR ( const char * chars, int len ) const" @@ -75,40 +75,40 @@ Inherited by QBig5Codec, QBig5hkscsCodec, QEucJpCodec, QEucKrCodec, QGb18030Code .SS "Static Public Members" .in +1c .ti -1c -.BI "QTextCodec * \fBloadCharmap\fR ( TQIODevice * iod )" +.BI "TQTextCodec * \fBloadCharmap\fR ( TQIODevice * iod )" .br .ti -1c -.BI "QTextCodec * \fBloadCharmapFile\fR ( TQString filename )" +.BI "TQTextCodec * \fBloadCharmapFile\fR ( TQString filename )" .br .ti -1c -.BI "QTextCodec * \fBcodecForMib\fR ( int mib )" +.BI "TQTextCodec * \fBcodecForMib\fR ( int mib )" .br .ti -1c -.BI "QTextCodec * \fBcodecForName\fR ( const char * name, int accuracy = 0 )" +.BI "TQTextCodec * \fBcodecForName\fR ( const char * name, int accuracy = 0 )" .br .ti -1c -.BI "QTextCodec * \fBcodecForContent\fR ( const char * chars, int len )" +.BI "TQTextCodec * \fBcodecForContent\fR ( const char * chars, int len )" .br .ti -1c -.BI "QTextCodec * \fBcodecForIndex\fR ( int i )" +.BI "TQTextCodec * \fBcodecForIndex\fR ( int i )" .br .ti -1c -.BI "QTextCodec * \fBcodecForLocale\fR ()" +.BI "TQTextCodec * \fBcodecForLocale\fR ()" .br .ti -1c -.BI "void \fBsetCodecForLocale\fR ( QTextCodec * c )" +.BI "void \fBsetCodecForLocale\fR ( TQTextCodec * c )" .br .ti -1c -.BI "QTextCodec * \fBcodecForTr\fR ()" +.BI "TQTextCodec * \fBcodecForTr\fR ()" .br .ti -1c -.BI "void \fBsetCodecForTr\fR ( QTextCodec * c )" +.BI "void \fBsetCodecForTr\fR ( TQTextCodec * c )" .br .ti -1c -.BI "QTextCodec * \fBcodecForCStrings\fR ()" +.BI "TQTextCodec * \fBcodecForCStrings\fR ()" .br .ti -1c -.BI "void \fBsetCodecForCStrings\fR ( QTextCodec * c )" +.BI "void \fBsetCodecForCStrings\fR ( TQTextCodec * c )" .br .ti -1c .BI "void \fBdeleteAllCodecs\fR ()" @@ -120,7 +120,7 @@ Inherited by QBig5Codec, QBig5hkscsCodec, QEucJpCodec, QEucKrCodec, QGb18030Code .SS "Protected Members" .in +1c .ti -1c -.BI "\fBQTextCodec\fR ()" +.BI "\fBTQTextCodec\fR ()" .br .in -1c .SS "Static Protected Members" @@ -130,11 +130,11 @@ Inherited by QBig5Codec, QBig5hkscsCodec, QEucJpCodec, QEucKrCodec, QGb18030Code .br .in -1c .SH DESCRIPTION -The QTextCodec class provides conversion between text encodings. +The TQTextCodec class provides conversion between text encodings. .PP Qt uses Unicode to store, draw and manipulate strings. In many situations you may wish to deal with data that uses a different encoding. For example, most Japanese documents are still stored in Shift-JIS or ISO2022, while Russian users often have their documents in KOI8-R or CP1251. .PP -Qt provides a set of QTextCodec classes to help with converting non-Unicode formats to and from Unicode. You can also create your own codec classes (see later). +Qt provides a set of TQTextCodec classes to help with converting non-Unicode formats to and from Unicode. You can also create your own codec classes (see later). .PP The supported encodings are: .TP @@ -224,13 +224,13 @@ Apple Roman .TP TIS-620 -- Thai .PP -QTextCodecs can be used as follows to convert some locally encoded string to Unicode. Suppose you have some string encoded in Russian KOI8-R encoding, and want to convert it to Unicode. The simple way to do this is: +TQTextCodecs can be used as follows to convert some locally encoded string to Unicode. Suppose you have some string encoded in Russian KOI8-R encoding, and want to convert it to Unicode. The simple way to do this is: .PP .nf .br QCString locallyEncoded = "..."; // text to convert .br - QTextCodec *codec = QTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R + TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R .br TQString unicodeString = codec->toUnicode( locallyEncoded ); .br @@ -242,7 +242,7 @@ After this, \fCunicodeString\fR holds the text converted to Unicode. Converting .br TQString unicodeString = "..."; // any Unicode text .br - QTextCodec *codec = QTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R + TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R .br QCString locallyEncoded = codec->fromUnicode( unicodeString ); .br @@ -250,13 +250,13 @@ After this, \fCunicodeString\fR holds the text converted to Unicode. Converting .PP Some care must be taken when trying to convert the data in chunks, for example, when receiving it over a network. In such cases it is possible that a multi-byte character will be split over two chunks. At best this might result in the loss of a character and at worst cause the entire conversion to fail. .PP -The approach to use in these situations is to create a QTextDecoder object for the codec and use this QTextDecoder for the whole decoding process, as shown below: +The approach to use in these situations is to create a TQTextDecoder object for the codec and use this TQTextDecoder for the whole decoding process, as shown below: .PP .nf .br - QTextCodec *codec = QTextCodec::codecForName( "Shift-JIS" ); + TQTextCodec *codec = TQTextCodec::codecForName( "Shift-JIS" ); .br - QTextDecoder *decoder = codec->makeDecoder(); + TQTextDecoder *decoder = codec->makeDecoder(); .br .br TQString unicodeString; @@ -271,17 +271,17 @@ The approach to use in these situations is to create a QTextDecoder object for t .br .fi .PP -The QTextDecoder object maintains state between chunks and therefore works correctly even if a multi-byte character is split between chunks. +The TQTextDecoder object maintains state between chunks and therefore works correctly even if a multi-byte character is split between chunks. .SH "Creating your own Codec class" -Support for new text encodings can be added to TQt by creating QTextCodec subclasses. +Support for new text encodings can be added to TQt by creating TQTextCodec subclasses. .PP -Built-in codecs can be overridden by custom codecs since more recently created QTextCodec objects take precedence over earlier ones. +Built-in codecs can be overridden by custom codecs since more recently created TQTextCodec objects take precedence over earlier ones. .PP You may find it more convenient to make your codec class available as a plugin; see the plugin documentation for more details. .PP -The abstract virtual functions describe the encoder to the system and the coder is used as required in the different text file formats supported by QTextStream, and under X11, for the locale-specific character input and output. +The abstract virtual functions describe the encoder to the system and the coder is used as required in the different text file formats supported by TQTextStream, and under X11, for the locale-specific character input and output. .PP -To add support for another 8-bit encoding to Qt, make a subclass of QTextCodec and implement at least the following methods: +To add support for another 8-bit encoding to Qt, make a subclass of TQTextCodec and implement at least the following methods: .PP .nf .br @@ -301,10 +301,10 @@ If the encoding is multi-byte then it will have "state"; that is, the interpreta .PP .nf .br - QTextDecoder* makeDecoder() const + TQTextDecoder* makeDecoder() const .br .fi -Return a QTextDecoder that remembers incomplete multi-byte sequence prefixes or other required state. +Return a TQTextDecoder that remembers incomplete multi-byte sequence prefixes or other required state. .PP If the encoding does \fInot\fR require state, you should implement: .PP @@ -315,16 +315,16 @@ If the encoding does \fInot\fR require state, you should implement: .fi Converts \fIlen\fR characters from \fIchars\fR to Unicode. .PP -The base QTextCodec class has default implementations of the above two functions, \fIbut they are mutually recursive\fR, so you must re-implement at least one of them, or both for improved efficiency. +The base TQTextCodec class has default implementations of the above two functions, \fIbut they are mutually recursive\fR, so you must re-implement at least one of them, or both for improved efficiency. .PP For conversion from Unicode to 8-bit encodings, it is rarely necessary to maintain state. However, two functions similar to the two above are used for encoding: .PP .nf .br - QTextEncoder* makeEncoder() const + TQTextEncoder* makeEncoder() const .br .fi -Return a QTextEncoder. +Return a TQTextEncoder. .PP .nf .br @@ -346,7 +346,7 @@ Gives a value indicating how likely it is that \fIlen\fR characters from \fIchar .PP A good model for this function is the QWindowsLocalCodec::heuristicContentMatch function found in the TQt sources. .PP -A QTextCodec subclass might have improved performance if you also re-implement: +A TQTextCodec subclass might have improved performance if you also re-implement: .PP .nf .br @@ -373,26 +373,26 @@ Codecs can also be created as plugins. .PP See also Internationalization with Qt. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QTextCodec::QTextCodec ()\fC [protected]\fR" +.SH "TQTextCodec::TQTextCodec ()\fC [protected]\fR" \fBWarning:\fR This function is \fInot\fR reentrant.</p> .PP -Constructs a QTextCodec, and gives it the highest precedence. The QTextCodec should always be constructed on the heap (i.e. with \fCnew\fR). TQt takes ownership and will delete it when the application terminates. -.SH "QTextCodec::~QTextCodec ()\fC [virtual]\fR" +Constructs a TQTextCodec, and gives it the highest precedence. The TQTextCodec should always be constructed on the heap (i.e. with \fCnew\fR). TQt takes ownership and will delete it when the application terminates. +.SH "TQTextCodec::~TQTextCodec ()\fC [virtual]\fR" \fBWarning:\fR This function is \fInot\fR reentrant.</p> .PP -Destroys the QTextCodec. Note that you should not delete codecs yourself: once created they become Qt's responsibility. -.SH "bool QTextCodec::canEncode ( TQChar ch ) const\fC [virtual]\fR" +Destroys the TQTextCodec. Note that you should not delete codecs yourself: once created they become Qt's responsibility. +.SH "bool TQTextCodec::canEncode ( TQChar ch ) const\fC [virtual]\fR" Returns TRUE if the Unicode character \fIch\fR can be fully encoded with this codec; otherwise returns FALSE. The default implementation tests if the result of toUnicode(fromUnicode(ch)) is the original \fIch\fR. Subclasses may be able to improve the efficiency. -.SH "bool QTextCodec::canEncode ( const TQString & s ) const\fC [virtual]\fR" +.SH "bool TQTextCodec::canEncode ( const TQString & s ) const\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIs\fR contains the string being tested for encode-ability. -.SH "QTextCodec * QTextCodec::codecForCStrings ()\fC [static]\fR" +.SH "TQTextCodec * TQTextCodec::codecForCStrings ()\fC [static]\fR" Returns the codec used by TQString to convert to and from const char* and QCStrings. If this function returns 0 (the default), TQString assumes Latin-1. .PP See also setCodecForCStrings(). -.SH "QTextCodec * QTextCodec::codecForContent ( const char * chars, int len )\fC [static]\fR" -Searches all installed QTextCodec objects, returning the one which most recognizes the given content. May return 0. +.SH "TQTextCodec * TQTextCodec::codecForContent ( const char * chars, int len )\fC [static]\fR" +Searches all installed TQTextCodec objects, returning the one which most recognizes the given content. May return 0. .PP Note that this is often a poor choice, since character encodings often use most of the available character sequences, and so only by linguistic analysis could a true match be made. .PP @@ -401,99 +401,99 @@ Note that this is often a poor choice, since character encodings often use most See also heuristicContentMatch(). .PP Example: qwerty/qwerty.cpp. -.SH "QTextCodec * QTextCodec::codecForIndex ( int i )\fC [static]\fR" -Returns the QTextCodec \fIi\fR positions from the most recently inserted codec, or 0 if there is no such QTextCodec. Thus, codecForIndex(0) returns the most recently created QTextCodec. +.SH "TQTextCodec * TQTextCodec::codecForIndex ( int i )\fC [static]\fR" +Returns the TQTextCodec \fIi\fR positions from the most recently inserted codec, or 0 if there is no such TQTextCodec. Thus, codecForIndex(0) returns the most recently created TQTextCodec. .PP Example: qwerty/qwerty.cpp. -.SH "QTextCodec * QTextCodec::codecForLocale ()\fC [static]\fR" +.SH "TQTextCodec * TQTextCodec::codecForLocale ()\fC [static]\fR" Returns a pointer to the codec most suitable for this locale. .PP Example: qwerty/qwerty.cpp. -.SH "QTextCodec * QTextCodec::codecForMib ( int mib )\fC [static]\fR" -Returns the QTextCodec which matches the MIBenum \fImib\fR. -.SH "QTextCodec * QTextCodec::codecForName ( const char * name, int accuracy = 0 )\fC [static]\fR" -Searches all installed QTextCodec objects and returns the one which best matches \fIname\fR; the match is case-insensitive. Returns 0 if no codec's heuristicNameMatch() reports a match better than \fIaccuracy\fR, or if \fIname\fR is a null string. +.SH "TQTextCodec * TQTextCodec::codecForMib ( int mib )\fC [static]\fR" +Returns the TQTextCodec which matches the MIBenum \fImib\fR. +.SH "TQTextCodec * TQTextCodec::codecForName ( const char * name, int accuracy = 0 )\fC [static]\fR" +Searches all installed TQTextCodec objects and returns the one which best matches \fIname\fR; the match is case-insensitive. Returns 0 if no codec's heuristicNameMatch() reports a match better than \fIaccuracy\fR, or if \fIname\fR is a null string. .PP See also heuristicNameMatch(). -.SH "QTextCodec * QTextCodec::codecForTr ()\fC [static]\fR" +.SH "TQTextCodec * TQTextCodec::codecForTr ()\fC [static]\fR" Returns the codec used by TQObject::tr() on its argument. If this function returns 0 (the default), tr() assumes Latin-1. .PP See also setCodecForTr(). -.SH "void QTextCodec::deleteAllCodecs ()\fC [static]\fR" +.SH "void TQTextCodec::deleteAllCodecs ()\fC [static]\fR" Deletes all the created codecs. .PP \fBWarning:\fR Do not call this function. .PP -QApplication calls this function just before exiting to delete any QTextCodec objects that may be lying around. Since various other classes hold pointers to QTextCodec objects, it is not safe to call this function earlier. +QApplication calls this function just before exiting to delete any TQTextCodec objects that may be lying around. Since various other classes hold pointers to TQTextCodec objects, it is not safe to call this function earlier. .PP -If you are using the utility classes (like TQString) but not using QApplication, calling this function at the very end of your application may be helpful for chasing down memory leaks by eliminating any QTextCodec objects. -.SH "QCString QTextCodec::fromUnicode ( const TQString & uc, int & lenInOut ) const\fC [virtual]\fR" -QTextCodec subclasses must reimplement either this function or makeEncoder(). It converts the first \fIlenInOut\fR characters of \fIuc\fR from Unicode to the encoding of the subclass. If \fIlenInOut\fR is negative or too large, the length of \fIuc\fR is used instead. +If you are using the utility classes (like TQString) but not using QApplication, calling this function at the very end of your application may be helpful for chasing down memory leaks by eliminating any TQTextCodec objects. +.SH "QCString TQTextCodec::fromUnicode ( const TQString & uc, int & lenInOut ) const\fC [virtual]\fR" +TQTextCodec subclasses must reimplement either this function or makeEncoder(). It converts the first \fIlenInOut\fR characters of \fIuc\fR from Unicode to the encoding of the subclass. If \fIlenInOut\fR is negative or too large, the length of \fIuc\fR is used instead. .PP Converts \fIlenInOut\fR characters (not bytes) from \fIuc\fR, producing a QCString. \fIlenInOut\fR will be set to the length of the result (in bytes). .PP The default implementation makes an encoder with makeEncoder() and converts the input with that. Note that the default makeEncoder() implementation makes an encoder that simply calls this function, hence subclasses \fImust\fR reimplement one function or the other to avoid infinite recursion. .PP Reimplemented in QHebrewCodec. -.SH "QCString QTextCodec::fromUnicode ( const TQString & uc ) const" +.SH "QCString TQTextCodec::fromUnicode ( const TQString & uc ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIuc\fR is the unicode source string. -.SH "int QTextCodec::heuristicContentMatch ( const char * chars, int len ) const\fC [pure virtual]\fR" -QTextCodec subclasses must reimplement this function. It examines the first \fIlen\fR bytes of \fIchars\fR and returns a value indicating how likely it is that the string is a prefix of text encoded in the encoding of the subclass. A negative return value indicates that the text is detectably not in the encoding (e.g. it contains characters undefined in the encoding). A return value of 0 indicates that the text should be decoded with this codec rather than as ASCII, but there is no particular evidence. The value should range up to \fIlen\fR. Thus, most decoders will return -1, 0, or -\fIlen\fR. +.SH "int TQTextCodec::heuristicContentMatch ( const char * chars, int len ) const\fC [pure virtual]\fR" +TQTextCodec subclasses must reimplement this function. It examines the first \fIlen\fR bytes of \fIchars\fR and returns a value indicating how likely it is that the string is a prefix of text encoded in the encoding of the subclass. A negative return value indicates that the text is detectably not in the encoding (e.g. it contains characters undefined in the encoding). A return value of 0 indicates that the text should be decoded with this codec rather than as ASCII, but there is no particular evidence. The value should range up to \fIlen\fR. Thus, most decoders will return -1, 0, or -\fIlen\fR. .PP The characters are not null terminated. .PP See also codecForContent(). -.SH "int QTextCodec::heuristicNameMatch ( const char * hint ) const\fC [virtual]\fR" +.SH "int TQTextCodec::heuristicNameMatch ( const char * hint ) const\fC [virtual]\fR" Returns a value indicating how likely it is that this decoder is appropriate for decoding some format that has the given name. The name is compared with the \fIhint\fR. .PP A good match returns a positive number around the length of the string. A bad match is negative. .PP The default implementation calls simpleHeuristicNameMatch() with the name of the codec. -.SH "QTextCodec * QTextCodec::loadCharmap ( TQIODevice * iod )\fC [static]\fR" +.SH "TQTextCodec * TQTextCodec::loadCharmap ( TQIODevice * iod )\fC [static]\fR" Reads a POSIX2 charmap definition from \fIiod\fR. The parser recognizes the following lines: .PP <font name="sans"> <code_set_name> \fIname\fR</br> <escape_char> \fIcharacter\fR</br> % alias \fIalias\fR</br> CHARMAP</br> <\fItoken\fR> /x\fIhexbyte\fR <U\fIunicode\fR> ...</br> <\fItoken\fR> /d\fIdecbyte\fR <U\fIunicode\fR> ...</br> <\fItoken\fR> /\fIoctbyte\fR <U\fIunicode\fR> ...</br> <\fItoken\fR> /\fIany\fR/\fIany\fR... <U\fIunicode\fR> ...</br> END CHARMAP</br> </font> .PP -The resulting QTextCodec is returned (and also added to the global list of codecs). The name() of the result is taken from the code_set_name. +The resulting TQTextCodec is returned (and also added to the global list of codecs). The name() of the result is taken from the code_set_name. .PP -Note that a codec constructed in this way uses much more memory and is slower than a hand-written QTextCodec subclass, since tables in code are kept in memory shared by all TQt applications. +Note that a codec constructed in this way uses much more memory and is slower than a hand-written TQTextCodec subclass, since tables in code are kept in memory shared by all TQt applications. .PP See also loadCharmapFile(). .PP Example: qwerty/qwerty.cpp. -.SH "QTextCodec * QTextCodec::loadCharmapFile ( TQString filename )\fC [static]\fR" +.SH "TQTextCodec * TQTextCodec::loadCharmapFile ( TQString filename )\fC [static]\fR" A convenience function for loadCharmap() that loads the charmap definition from the file \fIfilename\fR. -.SH "const char * QTextCodec::locale ()\fC [static]\fR" +.SH "const char * TQTextCodec::locale ()\fC [static]\fR" Returns a string representing the current language and sublanguage, e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil. .PP Example: i18n/main.cpp. -.SH "QTextDecoder * QTextCodec::makeDecoder () const\fC [virtual]\fR" -Creates a QTextDecoder which stores enough state to decode chunks of char* data to create chunks of Unicode data. The default implementation creates a stateless decoder, which is only sufficient for the simplest encodings where each byte corresponds to exactly one Unicode character. +.SH "TQTextDecoder * TQTextCodec::makeDecoder () const\fC [virtual]\fR" +Creates a TQTextDecoder which stores enough state to decode chunks of char* data to create chunks of Unicode data. The default implementation creates a stateless decoder, which is only sufficient for the simplest encodings where each byte corresponds to exactly one Unicode character. .PP The caller is responsible for deleting the returned object. -.SH "QTextEncoder * QTextCodec::makeEncoder () const\fC [virtual]\fR" -Creates a QTextEncoder which stores enough state to encode chunks of Unicode data as char* data. The default implementation creates a stateless encoder, which is only sufficient for the simplest encodings where each Unicode character corresponds to exactly one character. +.SH "TQTextEncoder * TQTextCodec::makeEncoder () const\fC [virtual]\fR" +Creates a TQTextEncoder which stores enough state to encode chunks of Unicode data as char* data. The default implementation creates a stateless encoder, which is only sufficient for the simplest encodings where each Unicode character corresponds to exactly one character. .PP The caller is responsible for deleting the returned object. -.SH "int QTextCodec::mibEnum () const\fC [pure virtual]\fR" -Subclasses of QTextCodec must reimplement this function. It returns the MIBenum (see the IANA character-sets encoding file for more information). It is important that each QTextCodec subclass returns the correct unique value for this function. +.SH "int TQTextCodec::mibEnum () const\fC [pure virtual]\fR" +Subclasses of TQTextCodec must reimplement this function. It returns the MIBenum (see the IANA character-sets encoding file for more information). It is important that each TQTextCodec subclass returns the correct unique value for this function. .PP Reimplemented in QEucJpCodec. -.SH "const char * QTextCodec::mimeName () const\fC [virtual]\fR" +.SH "const char * TQTextCodec::mimeName () const\fC [virtual]\fR" Returns the preferred mime name of the encoding as defined in the IANA character-sets encoding file. .PP Reimplemented in QEucJpCodec, QEucKrCodec, QJisCodec, QHebrewCodec, and QSjisCodec. -.SH "const char * QTextCodec::name () const\fC [pure virtual]\fR" -QTextCodec subclasses must reimplement this function. It returns the name of the encoding supported by the subclass. When choosing a name for an encoding, consider these points: +.SH "const char * TQTextCodec::name () const\fC [pure virtual]\fR" +TQTextCodec subclasses must reimplement this function. It returns the name of the encoding supported by the subclass. When choosing a name for an encoding, consider these points: .TP -On X11, heuristicNameMatch( const char * hint ) is used to test if a the QTextCodec can convert between Unicode and the encoding of a font with encoding \fIhint\fR, such as "iso8859-1" for Latin-1 fonts," koi8-r" for Russian KOI8 fonts. The default algorithm of heuristicNameMatch() uses name(). +On X11, heuristicNameMatch( const char * hint ) is used to test if a the TQTextCodec can convert between Unicode and the encoding of a font with encoding \fIhint\fR, such as "iso8859-1" for Latin-1 fonts," koi8-r" for Russian KOI8 fonts. The default algorithm of heuristicNameMatch() uses name(). .TP Some applications may use this function to present encodings to the end user. .PP Example: qwerty/qwerty.cpp. -.SH "void QTextCodec::setCodecForCStrings ( QTextCodec * c )\fC [static]\fR" +.SH "void TQTextCodec::setCodecForCStrings ( TQTextCodec * c )\fC [static]\fR" \fBWarning:\fR This function is \fInot\fR reentrant.</p> .PP Sets the codec used by TQString to convert to and from const char* and QCStrings. If \fIc\fR is 0 (the default), TQString assumes Latin-1. @@ -501,11 +501,11 @@ Sets the codec used by TQString to convert to and from const char* and QCStrings \fBWarning:\fR Some codecs do not preserve the characters in the ascii range (0x00 to 0x7f). For example, the Japanese Shift-JIS encoding maps the backslash character (0x5a) to the Yen character. This leads to unexpected results when using the backslash character to escape characters in strings used in e.g. regular expressions. Use TQString::fromLatin1() to preserve characters in the ascii range when needed. .PP See also codecForCStrings() and setCodecForTr(). -.SH "void QTextCodec::setCodecForLocale ( QTextCodec * c )\fC [static]\fR" +.SH "void TQTextCodec::setCodecForLocale ( TQTextCodec * c )\fC [static]\fR" Set the codec to \fIc\fR; this will be returned by codecForLocale(). This might be needed for some applications that want to use their own mechanism for setting the locale. .PP See also codecForLocale(). -.SH "void QTextCodec::setCodecForTr ( QTextCodec * c )\fC [static]\fR" +.SH "void TQTextCodec::setCodecForTr ( TQTextCodec * c )\fC [static]\fR" \fBWarning:\fR This function is \fInot\fR reentrant.</p> .PP Sets the codec used by TQObject::tr() on its argument to \fIc\fR. If \fIc\fR is 0 (the default), tr() assumes Latin-1. @@ -522,7 +522,7 @@ If the literal quoted text in the program is not in the Latin-1 encoding, this f .br ... install any additional codecs ... .br - QTextCodec::setCodecForTr( QTextCodec::codecForName("eucKR") ); + TQTextCodec::setCodecForTr( TQTextCodec::codecForName("eucKR") ); .br ... .br @@ -533,35 +533,35 @@ If the literal quoted text in the program is not in the Latin-1 encoding, this f Note that this is not the way to select the encoding that the \fIuser\fR has chosen. For example, to convert an application containing literal English strings to Korean, all that is needed is for the English strings to be passed through tr() and for translation files to be loaded. For details of internationalization, see the TQt internationalization documentation. .PP See also codecForTr() and setCodecForCStrings(). -.SH "int QTextCodec::simpleHeuristicNameMatch ( const char * name, const char * hint )\fC [static protected]\fR" +.SH "int TQTextCodec::simpleHeuristicNameMatch ( const char * name, const char * hint )\fC [static protected]\fR" A simple utility function for heuristicNameMatch(): it does some very minor character-skipping so that almost-exact matches score high. \fIname\fR is the text we're matching and \fIhint\fR is used for the comparison. -.SH "TQString QTextCodec::toUnicode ( const char * chars, int len ) const\fC [virtual]\fR" -QTextCodec subclasses must reimplement this function or makeDecoder(). It converts the first \fIlen\fR characters of \fIchars\fR to Unicode. +.SH "TQString TQTextCodec::toUnicode ( const char * chars, int len ) const\fC [virtual]\fR" +TQTextCodec subclasses must reimplement this function or makeDecoder(). It converts the first \fIlen\fR characters of \fIchars\fR to Unicode. .PP The default implementation makes a decoder with makeDecoder() and converts the input with that. Note that the default makeDecoder() implementation makes a decoder that simply calls this function, hence subclasses \fImust\fR reimplement one function or the other to avoid infinite recursion. -.SH "TQString QTextCodec::toUnicode ( const QByteArray & a, int len ) const" +.SH "TQString TQTextCodec::toUnicode ( const QByteArray & a, int len ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIa\fR contains the source characters; \fIlen\fR contains the number of characters in \fIa\fR to use. -.SH "TQString QTextCodec::toUnicode ( const QByteArray & a ) const" +.SH "TQString TQTextCodec::toUnicode ( const QByteArray & a ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIa\fR contains the source characters. -.SH "TQString QTextCodec::toUnicode ( const QCString & a, int len ) const" +.SH "TQString TQTextCodec::toUnicode ( const QCString & a, int len ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIa\fR contains the source characters; \fIlen\fR contains the number of characters in \fIa\fR to use. -.SH "TQString QTextCodec::toUnicode ( const QCString & a ) const" +.SH "TQString TQTextCodec::toUnicode ( const QCString & a ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIa\fR contains the source characters. -.SH "TQString QTextCodec::toUnicode ( const char * chars ) const" +.SH "TQString TQTextCodec::toUnicode ( const char * chars ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIchars\fR contains the source characters. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqtextcodec.html +.BR http://doc.trolltech.com/tqtextcodec.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the |