[gvfs] afp: convert pascal strings into utf-8
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afp: convert pascal strings into utf-8
- Date: Sun, 22 Apr 2012 14:10:54 +0000 (UTC)
commit dee21fb98bfa5d0c9024d084458f69b1dd08154a
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sat Apr 21 18:20:47 2012 +0200
afp: convert pascal strings into utf-8
pascal strings are in the macintosh-roman character set and therefore need to
be converted into utf-8.
https://bugzilla.gnome.org/show_bug.cgi?id=674528
daemon/gvfsafpconnection.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsafpconnection.c b/daemon/gvfsafpconnection.c
index be489c5..2a519f0 100644
--- a/daemon/gvfsafpconnection.c
+++ b/daemon/gvfsafpconnection.c
@@ -287,7 +287,10 @@ g_vfs_afp_reply_read_pascal (GVfsAfpReply *reply, char **str)
}
if (str)
- *str = g_strndup (reply->data + reply->pos, strsize);
+ {
+ *str = g_convert (reply->data + reply->pos, strsize,
+ "UTF-8", "MACINTOSH", NULL, NULL, NULL);
+ }
reply->pos += strsize;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]