#! /bin/sh /usr/share/dpatch/dpatch-run
##
## last-changed-date-charset by <peter@p12n.org>
##
## DP: Convert $LastChangedDate$ keyword to the local character set.
## DP: See #290774.

@DPATCH@
--- a/subversion/libsvn_subr/subst.c
+++ b/subversion/libsvn_subr/subst.c
@@ -199,8 +199,12 @@
           break;
         case 'D': /* long format of date of this revision */
           if (date)
-            svn_stringbuf_appendcstr(value,
-                                     svn_time_to_human_cstring(date, pool));
+	    {
+              char *date_keyword;
+              char *date_utf8 = svn_time_to_human_cstring (date, pool);
+              svn_utf_cstring_from_utf8(&date_keyword, date_utf8, pool);
+              svn_stringbuf_appendcstr(value, date_keyword);
+            }
           break;
         case 'r': /* number of this revision */
           if (rev)
