Fossil SCM

Update the fossil_system() function so that it converts the system command form UTF8 into MBCS before calling system(). Speculative fix for ticket [8d916f5fc30be3].

drh 2011-05-03 01:12 windows-i18n
Commit a65c97afd622bb1ac861eac745e02f8f990d37fe
1 file changed +3 -1
+3 -1
--- src/main.c
+++ src/main.c
@@ -430,11 +430,13 @@
430430
#if defined(_WIN32)
431431
/* On windows, we have to put double-quotes around the entire command.
432432
** Who knows why - this is just the way windows works.
433433
*/
434434
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
435
- rc = system(zNewCmd);
435
+ char *zMbcs = fossil_utf8_to_mbcs(zNewCmd);
436
+ rc = system(zMbcs);
437
+ fossil_mbcs_free(zMbcs);
436438
free(zNewCmd);
437439
#else
438440
/* On unix, evaluate the command directly.
439441
*/
440442
rc = system(zOrigCmd);
441443
--- src/main.c
+++ src/main.c
@@ -430,11 +430,13 @@
430 #if defined(_WIN32)
431 /* On windows, we have to put double-quotes around the entire command.
432 ** Who knows why - this is just the way windows works.
433 */
434 char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
435 rc = system(zNewCmd);
 
 
436 free(zNewCmd);
437 #else
438 /* On unix, evaluate the command directly.
439 */
440 rc = system(zOrigCmd);
441
--- src/main.c
+++ src/main.c
@@ -430,11 +430,13 @@
430 #if defined(_WIN32)
431 /* On windows, we have to put double-quotes around the entire command.
432 ** Who knows why - this is just the way windows works.
433 */
434 char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
435 char *zMbcs = fossil_utf8_to_mbcs(zNewCmd);
436 rc = system(zMbcs);
437 fossil_mbcs_free(zMbcs);
438 free(zNewCmd);
439 #else
440 /* On unix, evaluate the command directly.
441 */
442 rc = system(zOrigCmd);
443

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button