Retorno: String convertida em UTF-8
Descrição: Chame a função informando a String para conversão
Bibliotecas: Nenhuma
Limitações: PHP 4+
<?php /** * Converte caracteres escritos em ISO-8859 em UTF-8 * * @author John-Henrique F. Silva <john@midianegocios.com.br> * @since 20100315 * @version 0.1 * @license http://creativecommons.org/licenses/by-nc-sa/2.0/br Commons Creative * @param String $strContent que precisa ser convertida * @return String convertida em UTF-8 */ function converte_utf8( $strContent ) { return mb_convert_encoding( $strContent, 'UTF-8', mb_detect_encoding( $strContent, 'UTF-8, ISO-8859-1', true ) ); } ?>
Edição feita por: hostdesigner, 15/03/2010, 09:53.