This project is read-only.

Fix problem utf8 caracters special accents and ñ

Jan 29, 2013 at 3:17 PM
Edited Jan 29, 2013 at 3:27 PM

originally had problems with utf8 characters like accents and ñ not correctly wordphp codec. solve the problem with a simple function.

I leave if interested



function prepara_texto($texto)
        return html_entity_decode(iconv('UTF-8', 'windows-1252',$texto));

$document->setValue('nombre_completo', prepara_texto('Hugo morán es un niñon'));
$document->setValue('fecha', 'Hoy');
$document->setValue('correlativo', '2');
$document->setValue('contrato', '4545ij');
$document->setValue('socio', prepara_texto('Mars'));

Oct 8, 2014 at 7:01 AM
Thanks, you save me the day! :-)