Method
GetTextEncoding
Description
Returns a TextEncoding object based on user-specified parameters.
Usage
result = GetTextEncoding(Base, Variant, Format)
Part |
Type |
Description |
---|---|---|
result |
TextEncoding object. |
|
Base |
The type of encoding. |
|
Variant |
Optional: Specific variation of Base. |
|
Format |
Optional: Format-only used by Unicode for defining which format of Unicode you wish to use. |
Notes
See the TextConverter class for the Base and Variant codes. The codes for Format are as follows:
Name |
Code |
---|---|
Default Format |
0 |
Unicode16BitFormat |
0 |
UnicodeUTF7Format |
1 |
UnicodeUTF8Format |
2 |
Unicode32BitFormat |
3 |
Sample code
The following example converts the text in a TextField:
Var c As TextConverter
c = GetTextConverter(GetTextEncoding(&h500), GetTextEncoding(0))
TextField2.Text = c.Convert(TextField1.Text)
Compatibility
All project types on all supported operating systems.
See also
ConvertEncoding, DefineEncoding, Encoding, GetTextConverter, GetFontTextEncoding, GetInternetTextEncoding functions; Encodings module; TextEncoding, TextConverter classes.