Method

# GetInternetTextEncoding

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

When decoding mail or web pages you would use this function to get the text encoding rather than `GetTextEncoding</api/text/encoding_text/gettextencoding>`. This function is the inverse of `TextEncoding</api/text/encoding_text/textencoding>`.InternetName. It returns the encoding associated with a standard name for that encoding as used on the Internet.

## Usage

``` xojo
result = GetInternetTextEncoding(str)
```

| Part   | Type                                                 | Description             |
|--------|------------------------------------------------------|-------------------------|
| result | `TextEncoding</api/text/encoding_text/textencoding>` | Text encoding of *str*. |
| str    | `String</api/data_types/string>`                     | Internet text.          |

## Sample code

``` xojo
' take an encoding and query the internet name
Var s As String = Encodings.ISOLatin4.InternetName
MessageBox(s) ' shows ISO-8859-4

' query encoding object for this name
Var e As TextEncoding = GetInternetTextEncoding(s)

' and show it:
MessageBox(e.InternetName)
```

## Compatibility

|                       |                       |
|-----------------------|-----------------------|
| **Project Types**     | Console, Desktop, Web |
| **Operating Systems** | All                   |

<div class="seealso">

`GetTextEncoding</api/text/encoding_text/gettextencoding>`, `TextEncoding</api/text/encoding_text/textencoding>` functions, `Encodings</api/text/encoding_text/encodings>` module.

</div>
