diff --git a/src/Faker/Provider/it_IT/Internet.php b/src/Faker/Provider/it_IT/Internet.php index a0288b4a..6e87907f 100644 --- a/src/Faker/Provider/it_IT/Internet.php +++ b/src/Faker/Provider/it_IT/Internet.php @@ -6,4 +6,17 @@ class Internet extends \Faker\Provider\Internet { protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'email.it', 'libero.it', 'yahoo.it'); protected static $tld = array('com', 'com', 'com', 'net', 'org', 'it', 'it', 'it'); + + /** + * Converts Italian characters to their ASCII representation + * + * @return string + */ + private static function toAscii($string) + { + $from = array('à', 'À', 'é', 'É', 'è', 'È', 'ù', 'Ù', "'"); + $to = array('a', 'A', 'e', 'E', 'e', 'E', 'u', 'U', ''); + + return str_replace($from, $to, $string); + } }