From e6077c30d14e9d662e8843c554db86c0d366d0b6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 6 Jun 2024 13:44:12 +0900 Subject: Rename str nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/ntqtextcodec.html | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'doc/html/ntqtextcodec.html') diff --git a/doc/html/ntqtextcodec.html b/doc/html/ntqtextcodec.html index a97812636..0cec4ec27 100644 --- a/doc/html/ntqtextcodec.html +++ b/doc/html/ntqtextcodec.html @@ -150,14 +150,14 @@ to do this is:

     TQCString locallyEncoded = "..."; // text to convert
     TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R
-    TQString unicodeString = codec->toUnicode( locallyEncoded );
+    TQString unicodeString = codec->toUnicode( locallyEncoded );
     

After this, unicodeString holds the text converted to Unicode. Converting a string from Unicode to the local encoding is just as easy:

-    TQString unicodeString = "..."; // any Unicode text
+    TQString unicodeString = "..."; // any Unicode text
     TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R"); // get the codec for KOI8-R
     TQCString locallyEncoded = codec->fromUnicode( unicodeString );
     
@@ -174,7 +174,7 @@ decoding process, as shown below: TQTextCodec *codec = TQTextCodec::codecForName( "Shift-JIS" ); TQTextDecoder *decoder = codec->makeDecoder(); - TQString unicodeString; + TQString unicodeString; while( receiving_data ) { TQByteArray chunk = new_data; unicodeString += decoder->toUnicode( chunk.data(), chunk.length() ); @@ -223,7 +223,7 @@ Return a TQTextDecoder that remembers incomplete prefixes or other required state.

If the encoding does not require state, you should implement:

-    TQString toUnicode(const char* chars, int len) const
+    TQString toUnicode(const char* chars, int len) const
     
Converts len characters from chars to Unicode. @@ -239,7 +239,7 @@ are used for encoding: Return a TQTextEncoder.

-    TQCString fromUnicode(const TQString& uc, int& lenInOut ) const
+    TQCString fromUnicode(const TQString& uc, int& lenInOut ) const
     
Converts lenInOut characters (of type TQChar) from the start of @@ -266,7 +266,7 @@ re-implement: Test if a Unicode character can be encoded.

-    bool canEncode( const TQString& ) const
+    bool canEncode( const TQString& ) const
     
Test if a string of Unicode characters can be encoded. @@ -302,7 +302,7 @@ implementation tests if the result of toUnicode(fromUni is the original ch. Subclasses may be able to improve the efficiency. -

bool TQTextCodec::canEncode ( const TQString & s ) const [virtual] +

bool TQTextCodec::canEncode ( const TQString & s ) const [virtual]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

s contains the string being tested for encode-ability. @@ -310,7 +310,7 @@ This is an overloaded member function, provided for convenience. It behaves esse

TQTextCodec * TQTextCodec::codecForCStrings () [static]

-

Returns the codec used by TQString to convert to and from const +

Returns the codec used by TQString to convert to and from const char* and TQCStrings. If this function returns 0 (the default), TQString assumes Latin-1.

See also setCodecForCStrings(). @@ -364,12 +364,12 @@ Deletes all the created codecs. 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. -

If you are using the utility classes (like TQString) but not using +

If you are using the utility classes (like TQString) but not using TQApplication, calling this function at the very end of your application may be helpful for chasing down memory leaks by eliminating any TQTextCodec objects. -

TQCString TQTextCodec::fromUnicode ( const TQString & uc, int & lenInOut ) const [virtual] +

TQCString TQTextCodec::fromUnicode ( const TQString & uc, int & lenInOut ) const [virtual]

TQTextCodec subclasses must reimplement either this function or makeEncoder(). It converts the first lenInOut characters of uc from Unicode to the encoding of the subclass. If lenInOut is @@ -383,7 +383,7 @@ hence subclasses must reimplement one function or the other to avoid infinite recursion.

Reimplemented in TQHebrewCodec. -

TQCString TQTextCodec::fromUnicode ( const TQString & uc ) const +

TQCString TQTextCodec::fromUnicode ( const TQString & uc ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

uc is the unicode source string. @@ -438,7 +438,7 @@ tables in code are kept in memory shared by all TQt applications.

See also loadCharmapFile().

Example: qwerty/qwerty.cpp. -

TQTextCodec * TQTextCodec::loadCharmapFile ( TQString filename ) [static] +

TQTextCodec * TQTextCodec::loadCharmapFile ( TQString filename ) [static]

A convenience function for loadCharmap() that loads the charmap definition from the file filename. @@ -506,14 +506,14 @@ encodings to the end user. -

Sets the codec used by TQString to convert to and from const char* +

Sets the codec used by TQString to convert to and from const char* and TQCStrings. If c is 0 (the default), TQString assumes Latin-1.

Warning: 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 +expressions. Use TQString::fromLatin1() to preserve characters in the ascii range when needed.

See also codecForCStrings() and setCodecForTr(). @@ -560,7 +560,7 @@ very minor character-skipping so that almost-exact matches score high. name is the text we're matching and hint is used for the comparison. -

TQString TQTextCodec::toUnicode ( const char * chars, int len ) const [virtual] +

TQString TQTextCodec::toUnicode ( const char * chars, int len ) const [virtual]

TQTextCodec subclasses must reimplement this function or makeDecoder(). It converts the first len characters of chars @@ -571,29 +571,29 @@ implementation makes a decoder that simply calls this function, hence subclasses must reimplement one function or the other to avoid infinite recursion. -

TQString TQTextCodec::toUnicode ( const TQByteArray & a, int len ) const +

TQString TQTextCodec::toUnicode ( const TQByteArray & a, int len ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

a contains the source characters; len contains the number of characters in a to use. -

TQString TQTextCodec::toUnicode ( const TQByteArray & a ) const +

TQString TQTextCodec::toUnicode ( const TQByteArray & a ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

a contains the source characters. -

TQString TQTextCodec::toUnicode ( const TQCString & a, int len ) const +

TQString TQTextCodec::toUnicode ( const TQCString & a, int len ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

a contains the source characters; len contains the number of characters in a to use. -

TQString TQTextCodec::toUnicode ( const TQCString & a ) const +

TQString TQTextCodec::toUnicode ( const TQCString & a ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

a contains the source characters. -

TQString TQTextCodec::toUnicode ( const char * chars ) const +

TQString TQTextCodec::toUnicode ( const char * chars ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

chars contains the source characters. -- cgit v1.2.3