Skip to content

Explicitly convert raw data to strings

Florian Müllner requested to merge wip/fmuellner/convert-raw into master

As strings are guaranteed to use UTF-8 in the GNOME platform, generic file APIs like g_file_load_contents() return raw data instead. Since gjs' recent update to mozjs60, this data is now returns as Uint8Array which cannot simply be treated as string - its toString() method boils down to arr.join(',') - so use gjs' new ByteArray module to explicitly convert the data.

Merge request reports