Normalize text to gnome extension



Hi everione!

I writing a extension for Gnome Shell.
I have a file with this text "decisión, se presentan desafíos cruciales" i need to normalize.
I have tried in this way:

let archivo = Gio.file_new_for_path(this.archivoPath);
let contenido = pag.load_contents(null);
let lineas = contenido.toString().split('\n');
let aliento = lineas[376];

let out = archivo.replace(null, false, Gio.FileCreateFlags.NONE, null);
Shell.write_string_to_stream (out, aliento);
out.close(null);

global.log(Shell.get_file_contents_utf8_sync(this.archivoPath));

Any idea?
--
Sebastián Ernesto González Villena.
Web site: http://sgonzalez.debianchile.cl


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]