[Vm-dev] [commit][3255]
squeak -help says that the default encoding for external text is UTF-8,
make it so.
commits at squeakvm.org
commits at squeakvm.org
Fri Feb 13 03:00:37 UTC 2015
Revision: 3255
Author: lewis
Date: 2015-02-12 19:00:34 -0800 (Thu, 12 Feb 2015)
Log Message:
-----------
squeak -help says that the default encoding for external text is UTF-8, make it so.
Modified Paths:
--------------
trunk/platforms/unix/vm/sqUnixMain.c
Modified: trunk/platforms/unix/vm/sqUnixMain.c
===================================================================
--- trunk/platforms/unix/vm/sqUnixMain.c 2015-02-12 19:20:06 UTC (rev 3254)
+++ trunk/platforms/unix/vm/sqUnixMain.c 2015-02-13 03:00:34 UTC (rev 3255)
@@ -99,7 +99,7 @@
int uxDropFileCount= 0; /* number of dropped items */
char **uxDropFileNames= 0; /* dropped filenames */
- int textEncodingUTF8= 0; /* 1 if copy from external selection uses UTF8 */
+ int textEncodingUTF8= 1; /* 1 if copy from external selection uses UTF8 */
#if defined(IMAGE_DUMP)
static int dumpImageFile= 0; /* 1 after SIGHUP received */
@@ -1082,10 +1082,11 @@
len= strlen(buf);
for (i= 0; i < len; ++i)
buf[i]= toupper(buf[i]);
- if ((!strcmp(buf, "UTF8")) || (!strcmp(buf, "UTF-8")))
- textEncodingUTF8= 1;
- else
- setEncoding(&uxTextEncoding, buf);
+ if (strcmp(buf, "UTF8") && strcmp(buf, "UTF-8"))
+ {
+ textEncodingUTF8= 0;
+ setEncoding(&uxTextEncoding, buf);
+ }
free(buf);
return 2;
}
More information about the Vm-dev
mailing list