php man page for iconv

Query: iconv

OS: php

Section: 3

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

ICONV(3)								 1								  ICONV(3)

iconv - Convert string to requested character encoding

SYNOPSIS
string iconv (string $in_charset, string $out_charset, string $str)
DESCRIPTION
Performs a character set conversion on the string $str from $in_charset to $out_charset.
PARAMETERS
o $in_charset - The input charset. o $out_charset - The output charset. If you append the string //TRANSLIT to $out_charset transliteration is activated. This means that when a character can't be represented in the target charset, it can be approximated through one or several similarly looking characters. If you append the string //IGNORE, characters that cannot be represented in the target charset are silently discarded. Otherwise, $str is cut from the first illegal character and an E_NOTICE is generated. o $str - The string to be converted.
RETURN VALUES
Returns the converted string or FALSE on failure.
EXAMPLES
Example #1 iconv(3) example <?php $text = "This is the Euro symbol 'EUR'."; echo 'Original : ', $text, PHP_EOL; echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text), PHP_EOL; echo 'IGNORE : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text), PHP_EOL; echo 'Plain : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL; ?> The above example will output something similar to: Original : This is the Euro symbol 'EUR'. TRANSLIT : This is the Euro symbol 'EUR'. IGNORE : This is the Euro symbol ''. Plain : Notice: iconv(): Detected an illegal character in input string in .iconv-example.php on line 7 This is the Euro symbol ' PHP Documentation Group ICONV(3)
Related Man Pages
iconv(1) - suse
iconv_open(3) - debian
iconv(1) - xfree86
iconv(1) - minix
iconv_open(3) - xfree86
Similar Topics in the Unix Linux Community
Convert case on specified position of flat file
to fetch the text after only first occurence
How to append in the beginning not at the end?
Iconv: conversion IBM-852 to UTF8 : which filesets to be installed ?
Create .nfo file in ISO-8859-1 or UTF-8