|
const | WSC_CHARSET = 'UTF-8' |
|
Definición en la línea 9 del archivo WSCCharset.php.
Removes non-unicode characters from input.
- Parámetros
-
mixed | $input | String or array. |
- Devuelve
- mixed String or array
Definición en la línea 644 del archivo WSCCharset.php.
static convert |
( |
|
$str, |
|
|
|
$from, |
|
|
|
$to = null |
|
) |
| |
|
static |
Convert a string from one charset to another. Uses mbstring and iconv functions if possible
- Parámetros
-
string | $str | Input string |
string | $from | Suspected charset of the input string |
string | $to | Target charset to convert to; defaults to WSC_CHARSET |
- Devuelve
- string Converted string
Definición en la línea 152 del archivo WSCCharset.php.
static detect |
( |
|
$string, |
|
|
|
$failover = null , |
|
|
|
$language = 'es_ES' |
|
) |
| |
|
static |
A method to guess character set of a string.
- Parámetros
-
string | $string | String |
string | $failover | Default result for failover |
string | $language | User language |
- Devuelve
- string Charset name
Definición en la línea 564 del archivo WSCCharset.php.
static error_handler |
( |
|
$errno, |
|
|
|
$errstr |
|
) |
| |
|
static |
Catch an error and throw an exception.
- Parámetros
-
int | $errno | Level of the error |
string | $errstr | Error message |
Definición en la línea 53 del archivo WSCCharset.php.
static parse_charset |
( |
|
$input | ) |
|
|
static |
Parse and validate charset name string (see #1485758). Sometimes charset string is malformed, there are also charset aliases but we need strict names for charset conversion (specially utf8 class)
- Parámetros
-
string | $input | Input charset name |
- Devuelve
- string The validated charset name
Definición en la línea 66 del archivo WSCCharset.php.
static utf16_to_utf8 |
( |
|
$str | ) |
|
|
static |
Converts string from UTF-16 to UTF-8 (helper for utf-7 to utf-8 conversion)
- Parámetros
-
- Devuelve
- string The converted string
Definición en la línea 323 del archivo WSCCharset.php.
static utf7_to_utf8 |
( |
|
$str | ) |
|
|
static |
Converts string from standard UTF-7 (RFC 2152) to UTF-8.
- Parámetros
-
string | $str | Input string (UTF-7) |
- Devuelve
- string Converted string (UTF-8)
Definición en la línea 274 del archivo WSCCharset.php.
static utf7imap_to_utf8 |
( |
|
$str | ) |
|
|
static |
Convert the data ($str) from RFC 2060's UTF-7 to UTF-8. If input data is invalid, return the original input string. RFC 2060 obviously intends the encoding to be unique (see point 5 in section 5.1.3), so we reject any non-canonical form, such as &ACY- (instead of &-) or &AMA-&AMA- (instead of &AMAAwA-).
Translated from C to PHP by Thomas Bruederli round.nosp@m.cube.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
- Parámetros
-
string | $str | Input string (UTF7-IMAP) |
- Devuelve
- string Output string (UTF-8)
Definición en la línea 358 del archivo WSCCharset.php.
static utf8_to_utf7imap |
( |
|
$str | ) |
|
|
static |
Convert the data ($str) from UTF-8 to RFC 2060's UTF-7. Unicode characters above U+FFFF are replaced by U+FFFE. If input data is invalid, return an empty string.
Translated from C to PHP by Thomas Bruederli round.nosp@m.cube.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
- Parámetros
-
string | $str | Input string (UTF-8) |
- Devuelve
- string Output string (UTF7-IMAP)
Definición en la línea 451 del archivo WSCCharset.php.
La documentación para esta clase fue generada a partir del siguiente fichero: