[libgit2-glib] Ensure hunk header text is in UTF-8
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Ensure hunk header text is in UTF-8
- Date: Sun, 8 Nov 2015 18:43:07 +0000 (UTC)
commit 22fcc8d6d43e92d2113ff3c6afcd81b816dc7d59
Author: Jesse van den Kieboom <jkieboom esri com>
Date: Sun Nov 8 19:41:54 2015 +0100
Ensure hunk header text is in UTF-8
libgit2-glib/ggit-diff-hunk.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgit2-glib/ggit-diff-hunk.c b/libgit2-glib/ggit-diff-hunk.c
index 48ddb07..78f1f25 100644
--- a/libgit2-glib/ggit-diff-hunk.c
+++ b/libgit2-glib/ggit-diff-hunk.c
@@ -23,6 +23,7 @@
#include <string.h>
#include "ggit-diff-hunk.h"
+#include "ggit-convert.h"
struct _GgitDiffHunk {
gint ref_count;
@@ -52,7 +53,7 @@ _ggit_diff_hunk_wrap (const git_diff_hunk *hunk)
ghunk->new_start = hunk->new_start;
ghunk->new_lines = hunk->new_lines;
- ghunk->header = g_strndup (hunk->header, hunk->header_len);
+ ghunk->header = ggit_convert_utf8 (hunk->header, hunk->header_len, NULL);
return ghunk;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]