[gvfs/gnome-3-4: 1/2] afp: convert pascal strings into utf-8
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gnome-3-4: 1/2] afp: convert pascal strings into utf-8
- Date: Fri, 27 Apr 2012 08:36:11 +0000 (UTC)
commit c082899363662f494c6dae422094d814dd2d040e
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]