<?php
$string = htmlentities('Av. 7 de setembro – Salvador', ENT_QUOTES, "UTF-8"); // String com o caracter que retorna erro $string2 = htmlentities('Av. 7 de setembro - Salvador', ENT_QUOTES, "UTF-8"); // String com o Hífen $array = array('string' => $string, 'string2' => $string2);
PD9waHAKCiAkc3RyaW5nICAgID0gaHRtbGVudGl0aWVzKCdBdi4gNyBkZSBzZXRlbWJybyDigJMgU2FsdmFkb3InLCBFTlRfUVVPVEVTLCAiVVRGLTgiKTsgLy8gU3RyaW5nIGNvbSBvIGNhcmFjdGVyIHF1ZSByZXRvcm5hIGVycm8KICRzdHJpbmcyICAgPSBodG1sZW50aXRpZXMoJ0F2LiA3IGRlIHNldGVtYnJvIC0gU2FsdmFkb3InLCBFTlRfUVVPVEVTLCAiVVRGLTgiKTsgLy8gU3RyaW5nIGNvbSBvIEjDrWZlbgogJGFycmF5ID0gYXJyYXkoJ3N0cmluZycgPT4gJHN0cmluZywgJ3N0cmluZzInID0+ICRzdHJpbmcyKTsKIGVjaG8ganNvbl9lbmNvZGUoJGFycmF5KTs=