In my Gnome Extension I would like to call GLib.convert
. Sadly it does not work with strings but wants a ByteArray. Now I wonder how to convert a Javascript String into a UTF-16 Byte Array.
Bonus points if this uses some part of the Gnome bindings instead of implementing in Javascript.