From 70024494041b53923a32939fa834efcfd2f1f888 Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Mon, 17 Jun 2013 13:23:29 +0000
Subject: Use more portable TclIsSpaceProc() in stead of isspace(). Make sure
 that "string is space \u180e" continues to return 1 for whatever unicode
 version.

---
 generic/tclCmdAH.c | 7 +++----
 generic/tclDate.c  | 2 +-
 generic/tclUtf.c   | 4 +++-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 44f08a3..7f0df83 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -130,8 +130,7 @@ Tcl_CaseObjCmd(
     for (i = 0;  i < caseObjc;  i += 2) {
 	int patObjc, j;
 	const char **patObjv;
-	char *pat;
-	unsigned char *p;
+	char *pat, *p;
 
 	if (i == (caseObjc - 1)) {
 	    Tcl_ResetResult(interp);
@@ -145,8 +144,8 @@ Tcl_CaseObjCmd(
 	 */
 
 	pat = TclGetString(caseObjv[i]);
-	for (p = (unsigned char *) pat; *p != '\0'; p++) {
-	    if (isspace(*p) || (*p == '\\')) {	/* INTL: ISO space, UCHAR */
+	for (p = pat; *p != '\0'; p++) {
+	    if (TclIsSpaceProc(*p) || (*p == '\\')) {
 		break;
 	    }
 	}
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 59da2ea..0bda22f 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -2690,7 +2690,7 @@ TclDatelex(
 
     location->first_column = yyInput - info->dateStart;
     for ( ; ; ) {
-	while (isspace(UCHAR(*yyInput))) {
+	while (TclIsSpaceProc(*yyInput)) {
 	    yyInput++;
 	}
 
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index f3d1758..a122685 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -1554,7 +1554,9 @@ Tcl_UniCharIsSpace(
      */
 
     if (((Tcl_UniChar) ch) < ((Tcl_UniChar) 0x80)) {
-	return isspace(UCHAR(ch)); /* INTL: ISO space */
+	return TclIsSpaceProc(ch);
+    } else if ((Tcl_UniChar) ch == 0x180e) {
+	return 1;
     } else {
 	return ((SPACE_BITS >> GetCategory(ch)) & 1);
     }
-- 
cgit v0.12