ALT Linux repositórios
Group :: Desktop gráfico/GNOME
RPM: yelp
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: yelp-2.23.1-alt-man_encoding-part2.patch
Download
Download
diff -durN yelp-2.23.91.orig/src/yelp-man-parser.c yelp-2.23.91/src/yelp-man-parser.c
--- yelp-2.23.91.orig/src/yelp-man-parser.c 2008-09-11 17:50:07 +0400
+++ yelp-2.23.91/src/yelp-man-parser.c 2008-09-14 17:45:32 +0400
@@ -99,12 +99,28 @@
{
GError *errormsg = NULL;
/*gchar *ptr = NULL;*/
+ gchar **recode_argv;
+ gint recode_stdout_fd;
g_return_val_if_fail (parser != NULL, NULL);
g_return_val_if_fail (file != NULL, NULL);
g_return_val_if_fail (encoding != NULL, NULL);
- parser->channel = yelp_io_channel_new_file (file, NULL);
+ recode_argv = g_new (gchar *, 3);
+ recode_argv[0] = g_strdup ("man-show-source");
+ recode_argv[1] = g_strdup (file);
+ recode_argv[2] = NULL;
+ if (g_spawn_async_with_pipes (NULL, recode_argv, NULL,
+ G_SPAWN_SEARCH_PATH |
+ G_SPAWN_STDERR_TO_DEV_NULL,
+ NULL, NULL, NULL,
+ NULL, &recode_stdout_fd, NULL,
+ NULL)) {
+ parser->channel = g_io_channel_unix_new (recode_stdout_fd);
+ encoding = "UTF-8";
+ } else
+ parser->channel = yelp_io_channel_new_file (file, NULL);
+ g_strfreev (recode_argv);
if (!parser->channel)
return NULL;