From 58a264b1b36c51ad1c1931a847e6e9f33c9a8092 Mon Sep 17 00:00:00 2001 From: jhs Date: Thu, 14 Feb 2008 09:16:13 +0000 Subject: [PATCH] 2008-02-13 James Liggett * plugins/subversion/svn-diff-command.c: (svn_diff_command_run): Output in UTF-8 format to avoid hangs with the editor. (#516014) git-svn-id: http://svn.gnome.org/svn/anjuta/trunk@3656 1dbfb86a-d425-0410-a06b-cb591aac69f6 --- ChangeLog | 5 +++++ plugins/subversion/svn-diff-command.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6c532aec..b1e1d72d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-13 James Liggett + + * plugins/subversion/svn-diff-command.c: (svn_diff_command_run): + Output in UTF-8 format to avoid hangs with the editor. (#516014) + 2008-02-14 Johannes Schmid * plugins/language-support-cpp-java/plugin.c: diff --git a/plugins/subversion/svn-diff-command.c b/plugins/subversion/svn-diff-command.c index e9090347..478f3e71 100644 --- a/plugins/subversion/svn-diff-command.c +++ b/plugins/subversion/svn-diff-command.c @@ -151,7 +151,17 @@ svn_diff_command_run (AnjutaCommand *command) if (strlen (line)) { anjuta_async_command_lock (ANJUTA_ASYNC_COMMAND (command)); - g_queue_push_tail (self->priv->output, g_strdup (line)); + + /* Make sure that we only output UTF-8. We could have done this by + * passing in "UTF-8" for header encoding to the diff API, but there + * is the possiblity that an external diff program could be used, in + * which case that arguement wouldn't do anything. As a workaround, + * have the internal diff system return things in the system + * charset, and make the (hopefully safe) assumption that any + * external diff program also outputs in the current locale. */ + g_queue_push_tail (self->priv->output, + g_locale_to_utf8 (line, read_size, NULL, NULL, + NULL)); anjuta_async_command_unlock (ANJUTA_ASYNC_COMMAND (command)); g_free (line); -- 2.11.4.GIT