Created
October 27, 2015 17:23
-
-
Save pedrokoblitz/ce2cbb9b5e100ed98c0d to your computer and use it in GitHub Desktop.
codificação no culutra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Na pasta /encoding há um arquivo Encoding.php com a classe Encoding | |
// incluir se não estiver (prestar atenção no caminho) | |
class_exists('Encoding') || require(dirname(__FILE__) . '/../encoding/Encoding.php'); | |
// converter para Latin-1 | |
$minhaStringQuebrada = 'Não çei'; | |
echo Encoding::toLatin1($minhaStringQuebrada)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment