The UConverter class

Introduction

Class synopsis

UConverter
/* Constants */
public const int UConverter::REASON_UNASSIGNED;
public const int UConverter::REASON_ILLEGAL;
public const int UConverter::REASON_IRREGULAR;
public const int UConverter::REASON_RESET;
public const int UConverter::REASON_CLOSE;
public const int UConverter::REASON_CLONE;
public const int UConverter::UNSUPPORTED_CONVERTER;
public const int UConverter::SBCS;
public const int UConverter::DBCS;
public const int UConverter::MBCS;
public const int UConverter::LATIN_1;
public const int UConverter::UTF8;
public const int UConverter::UTF16_BigEndian;
public const int UConverter::UTF16_LittleEndian;
public const int UConverter::UTF32_BigEndian;
public const int UConverter::UTF32_LittleEndian;
public const int UConverter::EBCDIC_STATEFUL;
public const int UConverter::ISO_2022;
public const int UConverter::LMBCS_1;
public const int UConverter::LMBCS_2;
public const int UConverter::LMBCS_3;
public const int UConverter::LMBCS_4;
public const int UConverter::LMBCS_5;
public const int UConverter::LMBCS_6;
public const int UConverter::LMBCS_8;
public const int UConverter::LMBCS_11;
public const int UConverter::LMBCS_16;
public const int UConverter::LMBCS_17;
public const int UConverter::LMBCS_18;
public const int UConverter::LMBCS_19;
public const int UConverter::LMBCS_LAST;
public const int UConverter::HZ;
public const int UConverter::SCSU;
public const int UConverter::ISCII;
public const int UConverter::US_ASCII;
public const int UConverter::UTF7;
public const int UConverter::BOCU1;
public const int UConverter::UTF16;
public const int UConverter::UTF32;
public const int UConverter::CESU8;
public const int UConverter::IMAP_MAILBOX;
/* Methods */
public __construct(stringnull $destination_encoding = null, stringnull $source_encoding = null)
public stringfalse convert(string $str, bool $reverse = false)
public stringintarraynull fromUCallback(
    int $reason,
    array $source,
    int $codePoint,
    int &$error
)
public static arrayfalsenull getAliases(string $name)
public static array getAvailable()
public stringfalsenull getDestinationEncoding()
public intfalsenull getDestinationType()
public int getErrorCode()
public stringnull getErrorMessage()
public stringfalsenull getSourceEncoding()
public intfalsenull getSourceType()
public static arraynull getStandards()
public stringfalsenull getSubstChars()
public static string reasonText(int $reason)
public bool setDestinationEncoding(string $encoding)
public bool setSourceEncoding(string $encoding)
public bool setSubstChars(string $chars)
public stringintarraynull toUCallback(
    int $reason,
    string $source,
    string $codeUnits,
    int &$error
)
public static stringfalse transcode(
    string $str,
    string $toEncoding,
    string $fromEncoding,
    arraynull $options = null
)

Predefined Constants

UConverter::REASON_UNASSIGNED int

UConverter::REASON_ILLEGAL int

UConverter::REASON_IRREGULAR int

UConverter::REASON_RESET int

UConverter::REASON_CLOSE int

UConverter::REASON_CLONE int

UConverter::UNSUPPORTED_CONVERTER int

UConverter::SBCS int

UConverter::DBCS int

UConverter::MBCS int

UConverter::LATIN_1 int

UConverter::UTF8 int

UConverter::UTF16_BigEndian int

UConverter::UTF16_LittleEndian int

UConverter::UTF32_BigEndian int

UConverter::UTF32_LittleEndian int

UConverter::EBCDIC_STATEFUL int

UConverter::ISO_2022 int

UConverter::LMBCS_1 int

UConverter::LMBCS_2 int

UConverter::LMBCS_3 int

UConverter::LMBCS_4 int

UConverter::LMBCS_5 int

UConverter::LMBCS_6 int

UConverter::LMBCS_8 int

UConverter::LMBCS_11 int

UConverter::LMBCS_16 int

UConverter::LMBCS_17 int

UConverter::LMBCS_18 int

UConverter::LMBCS_19 int

UConverter::LMBCS_LAST int

UConverter::HZ int

UConverter::SCSU int

UConverter::ISCII int

UConverter::US_ASCII int

UConverter::UTF7 int

UConverter::BOCU1 int

UConverter::UTF16 int

UConverter::UTF32 int

UConverter::CESU8 int

UConverter::IMAP_MAILBOX int

Changelog

Version Description
8.4.0 The class constants are now typed.
Table of Contents