pluma/0001-fix-pluma-utils-Fixed-garbled-toolTips-path-in-tab-p.patch
longcheng 342fddc9d6 fix(pluma-utils):Fixed garbled toolTips path in tab page with GB18030 encoding chinese translation
(cherry picked from commit 603a394b166246c5cb51d0fe4292274eaa4dd536)
2023-07-20 15:16:50 +08:00

39 lines
1.0 KiB
Diff

From a96a0a3207f0ff36d13f30a1c1b83edf420b3a23 Mon Sep 17 00:00:00 2001
From: luoqing <luoqing@kylinsec.com.cn>
Date: Thu, 20 Jul 2023 10:58:23 +0800
Subject: [PATCH] fix(pluma-utils):Fixed garbled toolTips path in tab page with
GB18030 encoding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复在GB18030编码下tab页中toolTips的路径乱码
Related #7248
---
pluma/pluma-utils.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pluma/pluma-utils.c b/pluma/pluma-utils.c
index a721695..334ef7b 100644
--- a/pluma/pluma-utils.c
+++ b/pluma/pluma-utils.c
@@ -1351,9 +1351,12 @@ pluma_utils_uri_for_display (const gchar *uri)
{
GFile *gfile;
gchar *parse_name;
-
+ gchar *get_path;
gfile = g_file_new_for_uri (uri);
- parse_name = g_file_get_parse_name (gfile);
+ // parse_name = g_file_get_parse_name (gfile);
+
+ get_path = g_file_get_path(gfile);
+ parse_name = g_locale_to_utf8(get_path, -1, NULL, NULL, NULL);
g_object_unref (gfile);
return parse_name;
--
2.27.0