downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<iconv_substrob_iconv_handler>
Last updated: Thu, 26 Jun 2008

iconv

(PHP 4 >= 4.0.5, PHP 5)

iconv — Convert string to requested character encoding

Description

string iconv ( string $in_charset , string $out_charset , string $str )

Performs a character set conversion on the string str from in_charset to out_charset .

Parameters

in_charset

The input charset.

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.

str

The string to be converted.

Return Values

Returns the converted string or FALSE on failure.

Examples

Example #1 iconv() example

<?php
echo iconv("ISO-8859-1", "UTF-8", "This is a test.");
?>



add a noteadd a note User Contributed Notes
Convert string to requested character encoding
There are no user contributed notes for this page.




<iconv_substrob_iconv_handler>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs