summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-21 23:58:13 (GMT)
committerhobbs <hobbs>1999-12-21 23:58:13 (GMT)
commit657087664e801b48de25adee54dc8dba661f4601 (patch)
tree76f8a45f28b841f127ee825da3183acee50b31bb /mac
parentbdf52c7793a08e6f394c1156dbfffdcde3daf2b8 (diff)
downloadtcl-657087664e801b48de25adee54dc8dba661f4601.zip
tcl-657087664e801b48de25adee54dc8dba661f4601.tar.gz
tcl-657087664e801b48de25adee54dc8dba661f4601.tar.bz2
* mac/tclMacOSA.c: fixed applescript for I18N [Bug: 3644]
Diffstat (limited to 'mac')
-rw-r--r--mac/README6
-rw-r--r--mac/tclMacOSA.c22
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;
}