The UTF-7 encoding encodes Unicode code points into 7-bit code units. (To use the terminology loosely, UTF-7 encodes Unicode into ASCII characters.) The standard UTF-7 encoding is specified in RFC 2152. The IMAP4 specification specifies a modified UTF-7 encoding for mailbox names.
Normally, you do not need to use the MUTF7 class to encode or decode IMAP4 mailbox names. The member functions of Imap4Client that take mailbox names as arguments do the encoding and decoding for you. However, the library uses the MUTF7 class internally and allows you to use it if you wish.
To understand the naming of the member functions, you should understand the underlying model. In the underlying model, applications process text in the UTF-16 encoding. Therefore, UTF-16 text is considered decoded text. UTF-7 text is considered encoded text.
Static Public Member Functions | |
| size_t | EncodeLen (const uint16_t *utf16, size_t utf16Len) |
| Gets the length of the UTF-7 string that would result from encoding the UTF-16 string. | |
| size_t | Encode (const uint16_t *utf16, size_t utf16Len, char *utf7, size_t utf7MaxLen) |
| Converts a UTF-16 string to UTF-7. | |
| size_t | DecodeLen (const char *utf7, size_t utf7Len) |
| Gets the length of the UTF-16 string that would result from decoding the UTF-7 string. | |
| size_t | Decode (const char *utf7, size_t utf7Len, uint16_t *utf16, size_t utf16MaxLen) |
| Converts a UTF-7 string to UTF-16. | |
|
||||||||||||||||||||
|
Converts a UTF-7 string to UTF-16.
|
|
||||||||||||
|
Gets the length of the UTF-16 string that would result from decoding the UTF-7 string. You may use this function to determine the required length of the array you need for the UTF-16 string. The return value is the length of the UTF-16 string in (16-bit) characters.
|
|
||||||||||||||||||||
|
Converts a UTF-16 string to UTF-7.
|
|
||||||||||||
|
Gets the length of the UTF-7 string that would result from encoding the UTF-16 string. You may use this function to determine the required length of the array you need for the UTF-7 string. The return value is the length of the UTF-7 string in bytes.
|
Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.