I used the utf8_encode function and now the data is written correctly.
This is the modified test code, if is useful for someone.
<?php
header('Content-Type: text/html; charset=UTF-8');
$p = new Page();
$p->setOutputFormatting(false);
$p->template = 'cita'; //
$p->parent = wire('pages')->get('/agenda/');
$p->name = $sanitizer->name("Solicitud de cita 20150629082201");
$p->title = $sanitizer->text(utf8_encode("Solicitud de cita de Pedro Pérez"));
$p->cita_nombre = $sanitizer->text(utf8_encode("Pedro Pérez"));
$p->cita_edad = 45;
$p->cita_telefono = "22334455";
$p->cita_correo = "pedro_perez@hotmail.com";
$p->cita_tipo = $sanitizer->text(utf8_encode("Nueva cita"));
$p->cita_otros_detalles = $sanitizer->textarea(utf8_encode("Presión alta"));
$p->cita_dia_hora1 = $sanitizer->text(utf8_encode("Lunes 4:00 p.m."));
$p->cita_dia_hora2 = $sanitizer->text(utf8_encode("Miércoles 5:00 p.m."));
$p->save();
echo "La página {$p->id} fue creada!<br>";
?>
Thanks