Can someone give some working example of how to read / write Unicode text files using Javascript and Gjs , possibly using Gio and / or Glib? I have experience in Javascript, but these APIs are still foreign to me and, being a completely new technology, the search engine does not help much.
I saw this: https://live.gnome.org/Seed/Tutorial/Simple_file_io , but it is based on seed (not Gjs) and it seems pretty old. I get errors (for example, too few arguments in Gio.read on line 9) and therefore cannot test text in Unicode.
A working snippet will be very helpful. Thanks!
Update . I am testing Ubuntu 12.04 64bit.
source share