Author: rinrab
Date: Wed May 28 19:23:16 2025
New Revision: 1925913

URL: http://svn.apache.org/viewvc?rev=1925913&view=rev
Log:
svnmucc: Make sure to convert log-message stuff to UTF-8 before starting
the operation and act like it is already UTF-8-ized.

* subversion/svnmucc/svnmucc.c
  (log_message_func): Invoke svn_subst_translate_string2() passing "UTF-8"
   as encoding.
  (sub_main:-F): Convert value of filedata to utf8.

This fixes a potential bug, because before the log_message_func() could be
converting the log-message twice after the one in -m handler.

Modified:
    subversion/trunk/subversion/svnmucc/svnmucc.c

Modified: subversion/trunk/subversion/svnmucc/svnmucc.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1925913&r1=1925912&r2=1925913&view=diff
==============================================================================
--- subversion/trunk/subversion/svnmucc/svnmucc.c (original)
+++ subversion/trunk/subversion/svnmucc/svnmucc.c Wed May 28 19:23:16 2025
@@ -429,7 +429,7 @@ log_message_func(const char **log_msg,
       svn_string_t *message = svn_string_create(lmb->log_message, pool);
 
       SVN_ERR_W(svn_subst_translate_string2(&message, NULL, NULL,
-                                            message, NULL, FALSE,
+                                            message, "UTF-8", FALSE,
                                             pool, pool),
                 _("Error normalizing log message to internal format"));
 
@@ -576,6 +576,7 @@ sub_main(int *exit_code,
             const char *filename;
             SVN_ERR(svn_utf_cstring_to_utf8(&filename, arg, pool));
             SVN_ERR(svn_stringbuf_from_file2(&filedata, filename, pool));
+            SVN_ERR(svn_utf_stringbuf_to_utf8(&filedata, filedata, pool));
           }
           break;
         case 'u':


Reply via email to