From 657087664e801b48de25adee54dc8dba661f4601 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 21 Dec 1999 23:58:13 +0000 Subject: * mac/tclMacOSA.c: fixed applescript for I18N [Bug: 3644] --- mac/README | 6 +++--- mac/tclMacOSA.c | 22 +++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/mac/README b/mac/README index 84aa4b1..d270ad7 100644 --- a/mac/README +++ b/mac/README @@ -8,7 +8,7 @@ Jim Ingham Cygnus Solutions jingham@cygnus.com -RCS: @(#) $Id: README,v 1.9 1999/10/05 22:46:13 hobbs Exp $ +RCS: @(#) $Id: README,v 1.10 1999/12/21 23:58:13 hobbs Exp $ 1. Introduction --------------- @@ -63,8 +63,8 @@ in the HTML format. You may also find these pages at: In order to compile Macintosh Tcl you must have the following items: - CodeWarrior Pro 2 or 3 - Mac Tcl (source) + CodeWarrior Pro 3+ + Mac Tcl (sources) More Files 1.4.3 The included project files should work fine. However, for diff --git a/mac/tclMacOSA.c b/mac/tclMacOSA.c index 72dcccf..5036a8e 100644 --- a/mac/tclMacOSA.c +++ b/mac/tclMacOSA.c @@ -12,7 +12,7 @@ * See the file "License Terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSA.c,v 1.5 1999/08/15 04:04:06 jingham Exp $ + * RCS: @(#) $Id: tclMacOSA.c,v 1.6 1999/12/21 23:58:13 hobbs Exp $ */ #define MAC_TCL @@ -2695,9 +2695,10 @@ prepareScriptData( int i; char buffer[7]; OSErr sysErr = noErr; - + Tcl_DString encodedText; + Tcl_DStringInit(scrptData); - + for (i = 0; i < argc; i++) { Tcl_DStringAppend(scrptData, argv[i], -1); Tcl_DStringAppend(scrptData, " ", 1); @@ -2707,7 +2708,7 @@ prepareScriptData( * First replace the \n's with \r's in the script argument * Also replace "\\n" with " ". */ - + for (ptr = scrptData->string; *ptr != '\0'; ptr++) { if (*ptr == '\n') { *ptr = '\r'; @@ -2718,10 +2719,13 @@ prepareScriptData( } } } - - sysErr = AECreateDesc(typeChar, Tcl_DStringValue(scrptData), - Tcl_DStringLength(scrptData), scrptDesc); - + + Tcl_UtfToExternalDString(NULL, Tcl_DStringValue(scrptData), + Tcl_DStringLength(scrptData), &encodedText); + sysErr = AECreateDesc(typeChar, Tcl_DStringValue(&encodedText), + Tcl_DStringLength(&encodedText), scrptDesc); + Tcl_DStringFree(&encodedText); + if (sysErr != noErr) { sprintf(buffer, "%6d", sysErr); Tcl_DStringFree(scrptData); @@ -2730,7 +2734,7 @@ prepareScriptData( Tcl_DStringAppend(scrptData, " creating Script Data Descriptor.", 33); return TCL_ERROR; } - + return TCL_OK; } -- cgit v0.12