Re: Javascript unicode problem

2012-12-26 Thread Norman L. Smith
Hello Sam: I ran this code in an extension and it works. data.txt is UTF-8. let [success, data] = GLib.file_get_contents('/home/bogwan/data.txt'); let byteData = imports.byteArray.fromString(data.toString(), "UTF-8"); GLib.file_set_contents('/home/bogwan/data2.txt', byteData, byteData.length);

Re: Javascript unicode problem

2012-12-26 Thread Norman L. Smith
Hello Sam: I remembered seeing something similar to your issue in the gnome-shell-list. I think the following links might be helpful to you. https://bugzilla.gnome.org/show_bug.cgi?id=680730 https://mail.gnome.org/archives/gnome-shell-list/2012-July/msg00143.html In the bug report the followi

Javascript unicode problem

2012-12-26 Thread Sam Bull
Hi guys, I hope this is the right place to post, I'm working on a shell extension, and need help with a few points to finish it up. The most pressing concern, before I can consider the extension usable, is when saving data to a file. I have used GLib.file_get_contents() to get the contents of a