From e013b6322aa7373a90bebb2260d4f5222ef624d1 Mon Sep 17 00:00:00 2001
From: Sergio Gelato <[email protected]>
Date: Sun, 17 Apr 2016 13:54:12 +0200
Subject: [PATCH] More accurate log message from do_conversion()

iri->uri_encoding isn't necessarily identical with opt.locale. Instead of
making unsafe assumptions about where do_conversion() is being called from,
base the log message on the actual arguments used.
---
 src/iri.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/iri.c b/src/iri.c
index 3998237..dd156f1 100644
--- a/src/iri.c
+++ b/src/iri.c
@@ -129,8 +129,8 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
   cd = iconv_open (tocode, fromcode);
   if (cd == (iconv_t)(-1))
     {
-      logprintf (LOG_VERBOSE, _("Conversion from %s to UTF-8 isn't supported\n"),
-                 quote (opt.locale));
+      logprintf (LOG_VERBOSE, _("Conversion from %s to %s isn't supported\n"),
+                 quote (fromcode), quote (tocode));
       *out = NULL;
       return false;
     }
-- 
2.1.4

Reply via email to