aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2008-05-14 17:41:17 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2008-05-14 17:41:17 +0000
commitead768f0b6260ef75293286c7172798b40031913 (patch)
treeb9c45ab5f9c3225fce8e11b128c86b847ecf7df5 /packages
parent013532c1dff104c2eeeaf91a093cbd6640f94e6a (diff)
added patch to fix problems of saving patches into folders with extended chars in it
svn path=/trunk/; revision=9799
Diffstat (limited to 'packages')
-rw-r--r--packages/patches/fix_encoding_bug_1572290-0.41.4.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/packages/patches/fix_encoding_bug_1572290-0.41.4.patch b/packages/patches/fix_encoding_bug_1572290-0.41.4.patch
new file mode 100644
index 00000000..9e8d07ee
--- /dev/null
+++ b/packages/patches/fix_encoding_bug_1572290-0.41.4.patch
@@ -0,0 +1,37 @@
+Index: t_tkcmd.c
+===================================================================
+--- t_tkcmd.c (revision 9782)
++++ t_tkcmd.c (working copy)
+@@ -509,10 +509,14 @@
+
+ static int pdCmd(ClientData cd, Tcl_Interp *interp, int argc, char **argv)
+ {
++ Tcl_DString dstring; /* used to convert the Tcl string to the OS encoding */
++ char *dstring_char;
+ if (argc == 2)
+ {
+ int n = strlen(argv[1]);
+- if (send(sockfd, argv[1], n, 0) < n)
++ /* NULL as first arg means use the current system encoding */
++ dstring_char = Tcl_UtfToExternalDString(NULL, argv[1], -1, &dstring);
++ if (send(sockfd, dstring_char, n, 0) < n)
+ {
+ perror("stdout");
+ tcl_mess("exit\n");
+@@ -534,12 +538,15 @@
+ if (i > 1) strcat(buf, " ");
+ strcat(buf, argv[i]);
+ }
+- if (send(sockfd, buf, strlen(buf), 0) < 0)
++ /* NULL as first arg means use the current system encoding */
++ dstring_char = Tcl_UtfToExternalDString(NULL, buf, -1, &dstring);
++ if (send(sockfd, dstring_char, strlen(dstring_char), 0) < 0)
+ {
+ perror("stdout");
+ tcl_mess("exit\n");
+ }
+ }
++ Tcl_DStringFree(&dstring);
+ return (TCL_OK);
+ }
+