php man page for mb_convert_encoding

Query: mb_convert_encoding

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

MB_CONVERT_ENCODING(3)							 1						    MB_CONVERT_ENCODING(3)

mb_convert_encoding - Convert character encoding

SYNOPSIS
string mb_convert_encoding (string $str, string $to_encoding, [mixed $from_encoding = mb_internal_encoding()])
DESCRIPTION
Converts the character encoding of string$str to $to_encoding from optionally $from_encoding.
PARAMETERS
o $str - The string being encoded. o $to_encoding - The type of encoding that $str is being converted to. o $from_encoding - Is specified by character code names before conversion. It is either an array, or a comma separated enumerated list. If $from_encoding is not specified, the internal encoding will be used. See supported encodings.
RETURN VALUES
The encoded string.
EXAMPLES
Example #1 mb_convert_encoding(3) example <?php /* Convert internal character encoding to SJIS */ $str = mb_convert_encoding($str, "SJIS"); /* Convert EUC-JP to UTF-7 */ $str = mb_convert_encoding($str, "UTF-7", "EUC-JP"); /* Auto detect encoding from JIS, eucjp-win, sjis-win, then convert str to UCS-2LE */ $str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win"); /* "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" */ $str = mb_convert_encoding($str, "EUC-JP", "auto"); ?>
SEE ALSO
mb_detect_order(3). PHP Documentation Group MB_CONVERT_ENCODING(3)
Related Man Pages
ujconv(1p) - debian
mb_convert_case(3) - php
mb_convert_variables(3) - php
mb_encode_mimeheader(3) - php
mb_strtoupper(3) - php
Similar Topics in the Unix Linux Community
String Manipulation Question....
Concatenate the string with the newline character
sprintf result on perl
How to find the file encoding and updating the file encoding?
Convert files to UTF-8 on AIX 7.1