Documentation

Horde_Imap_Client_Utf7imap
in package

Allows conversions between UTF-8 and UTF7-IMAP (RFC 3501 [5.1.3]).

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2000 Edmund Grimley Evans edmundo@rano.org

copyright

2008-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$_mbstring  : array<string|int, mixed>
Is mbstring extension available?
$_base64  : array<string|int, mixed>
Lookup table for conversion.
$_index64  : array<string|int, mixed>
Lookup table for conversion.
Utf7ImapToUtf8()  : string
Convert a string from UTF7-IMAP to UTF-8.
Utf8ToUtf7Imap()  : string
Convert a string from UTF-8 to UTF7-IMAP.

Properties

$_mbstring

Is mbstring extension available?

protected static array<string|int, mixed> $_mbstring = \null

$_base64

Lookup table for conversion.

private static array<string|int, mixed> $_base64 = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', ',')

$_index64

Lookup table for conversion.

private static array<string|int, mixed> $_index64 = array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, 63, -1, -1, -1, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1)

Methods

Utf7ImapToUtf8()

Convert a string from UTF7-IMAP to UTF-8.

public static Utf7ImapToUtf8(string $str) : string
Parameters
$str : string

The UTF7-IMAP string.

Tags
throws
Horde_Imap_Client_Exception
Return values
string

The converted UTF-8 string.

Utf8ToUtf7Imap()

Convert a string from UTF-8 to UTF7-IMAP.

public static Utf8ToUtf7Imap(string $str[, bool $force = true ]) : string
Parameters
$str : string

The UTF-8 string.

$force : bool = true

Assume $str is UTF-8 (no-autodetection)? If false, attempts to auto-detect if string is already in UTF7-IMAP.

Tags
throws
Horde_Imap_Client_Exception
Return values
string

The converted UTF7-IMAP string.

Search results