UConverter
class UConverter (View source)
Constants
| REASON_UNASSIGNED |
|
| REASON_ILLEGAL |
|
| REASON_IRREGULAR |
|
| REASON_RESET |
|
| REASON_CLOSE |
|
| REASON_CLONE |
|
| UNSUPPORTED_CONVERTER |
|
| SBCS |
|
| DBCS |
|
| MBCS |
|
| LATIN_1 |
|
| UTF8 |
|
| UTF16_BigEndian |
|
| UTF16_LittleEndian |
|
| UTF32_BigEndian |
|
| UTF32_LittleEndian |
|
| EBCDIC_STATEFUL |
|
| ISO_2022 |
|
| LMBCS_1 |
|
| LMBCS_2 |
|
| LMBCS_3 |
|
| LMBCS_4 |
|
| LMBCS_5 |
|
| LMBCS_6 |
|
| LMBCS_8 |
|
| LMBCS_11 |
|
| LMBCS_16 |
|
| LMBCS_17 |
|
| LMBCS_18 |
|
| LMBCS_19 |
|
| LMBCS_LAST |
|
| HZ |
|
| SCSU |
|
| ISCII |
|
| US_ASCII |
|
| UTF7 |
|
| BOCU1 |
|
| UTF16 |
|
| UTF32 |
|
| CESU8 |
|
| IMAP_MAILBOX |
|
Methods
(PHP 5 >=5.5.0)
Create UConverter object
(PHP 5 >=5.5.0)
Convert string from one charset to anothe
(PHP 5 >=5.5.0)
Default "from" callback function
(PHP 5 >=5.5.0)
Get the aliases of the given name
(PHP 5 >=5.5.0)
Get the available canonical converter names
(PHP 5 >=5.5.0)
Get the destination encoding
(PHP 5 >=5.5.0)
Get the destination converter type
(PHP 5 >=5.5.0)
Get last error code on the object
(PHP 5 >=5.5.0)
Get last error message on the object
(PHP 5 >=5.5.0)
Get the source encoding
(PHP 5 >=5.5.0)
Get the source convertor type
(PHP 5 >=5.5.0)
Get standards associated to converter names
(PHP 5 >=5.5.0)
Get substitution chars
(PHP 5 >=5.5.0)
Get string representation of the callback reason
(PHP 5 >=5.5.0)
Set the destination encoding
(PHP 5 >=5.5.0)
Set the source encoding
(PHP 5 >=5.5.0)
Set the substitution chars
(PHP 5 >=5.5.0)
Default "to" callback function
(PHP 5 >=5.5.0)
Convert string from one charset to another
Details
__construct(string $destination_encoding = null, string $source_encoding = null)
(PHP 5 >=5.5.0)
Create UConverter object
string|false
convert(string $str, bool $reverse = false)
(PHP 5 >=5.5.0)
Convert string from one charset to anothe
array|string|int|null
fromUCallback(int $reason, string $source, string $codePoint, int $error)
(PHP 5 >=5.5.0)
Default "from" callback function
static array|false|null
getAliases(string $name)
(PHP 5 >=5.5.0)
Get the aliases of the given name
static array
getAvailable()
(PHP 5 >=5.5.0)
Get the available canonical converter names
string|false|null
getDestinationEncoding()
(PHP 5 >=5.5.0)
Get the destination encoding
int|false|null
getDestinationType()
(PHP 5 >=5.5.0)
Get the destination converter type
int
getErrorCode()
(PHP 5 >=5.5.0)
Get last error code on the object
string|null
getErrorMessage()
(PHP 5 >=5.5.0)
Get last error message on the object
string|false|null
getSourceEncoding()
(PHP 5 >=5.5.0)
Get the source encoding
int|false|null
getSourceType()
(PHP 5 >=5.5.0)
Get the source convertor type
static array|null
getStandards()
(PHP 5 >=5.5.0)
Get standards associated to converter names
string|false|null
getSubstChars()
(PHP 5 >=5.5.0)
Get substitution chars
static string
reasonText(int $reason)
(PHP 5 >=5.5.0)
Get string representation of the callback reason
bool
setDestinationEncoding(string $encoding)
(PHP 5 >=5.5.0)
Set the destination encoding
bool
setSourceEncoding(string $encoding)
(PHP 5 >=5.5.0)
Set the source encoding
bool
setSubstChars(string $chars)
(PHP 5 >=5.5.0)
Set the substitution chars
array|string|int|null
toUCallback(int $reason, string $source, string $codeUnits, int $error)
(PHP 5 >=5.5.0)
Default "to" callback function
static string|false
transcode(string $str, string $toEncoding, string $fromEncoding, array|null $options = null)
(PHP 5 >=5.5.0)
Convert string from one charset to another