Javascript unicode problem

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 file, and
this works fine, converting it into a string I can use this for my
extension without a problem (everything works as expected).

The issue is when I save the data back into a file with
GLib.file_set_contents(), this causes the data to be corrupted on
non-ASCII characters. If I'm not mistaken, it appears to be losing the
first byte of any 2 byte character.

Do I need to do something to convert the string to another format or
anything, to make this work?

Thanks for any help,
Sam Bull

Attachment: signature.asc
Description: This is a digitally signed message part

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