summaryrefslogtreecommitdiffstats
path: root/intl/icu/source/extra/scrptrun
diff options
context:
space:
mode:
Diffstat (limited to 'intl/icu/source/extra/scrptrun')
-rw-r--r--intl/icu/source/extra/scrptrun/Makefile.in89
-rw-r--r--intl/icu/source/extra/scrptrun/readme.html69
-rw-r--r--intl/icu/source/extra/scrptrun/scrptrun.cpp203
-rw-r--r--intl/icu/source/extra/scrptrun/scrptrun.h156
-rw-r--r--intl/icu/source/extra/scrptrun/srtest.cpp41
-rw-r--r--intl/icu/source/extra/scrptrun/srtest.dsp110
-rw-r--r--intl/icu/source/extra/scrptrun/srtest.dsw29
7 files changed, 697 insertions, 0 deletions
diff --git a/intl/icu/source/extra/scrptrun/Makefile.in b/intl/icu/source/extra/scrptrun/Makefile.in
new file mode 100644
index 000000000..6712c4356
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/Makefile.in
@@ -0,0 +1,89 @@
+## Copyright (C) 2016 and later: Unicode, Inc. and others.
+## License & terms of use: http://www.unicode.org/copyright.html
+## Makefile.in for ICU - extra/scrptrun
+## Copyright (c) 2001-2011, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ../..
+
+include $(top_builddir)/icudefs.mk
+
+## Platform-specific setup
+include @platform_make_fragment@
+
+## Build directory information
+subdir = extra/scrptrun
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS)
+
+## Target information
+TARGET = srtest
+
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common -I$(top_srcdir)
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
+ENABLE_RPATH = @ENABLE_RPATH@
+ifeq ($(ENABLE_RPATH),YES)
+RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
+endif
+LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
+LIBS = $(LIBICUUC) @LIBS@ @LIB_M@
+
+OBJECTS = scrptrun.o srtest.o
+
+DEPS = $(OBJECTS:.o=.d)
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local \
+distclean distclean-local dist dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(TARGET)
+
+install-local:
+
+dist-local:
+
+clean-local:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+ $(RMV) $(OBJECTS) $(TARGET)
+
+distclean-local: clean-local
+ $(RMV) Makefile
+
+check-local: all-local
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(TARGET) : $(OBJECTS)
+ $(LINK.cc) -o $@ $^ $(LIBS)
+ $(POST_BUILD_STEP)
+
+invoke:
+ ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
diff --git a/intl/icu/source/extra/scrptrun/readme.html b/intl/icu/source/extra/scrptrun/readme.html
new file mode 100644
index 000000000..9968a5e85
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/readme.html
@@ -0,0 +1,69 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="Copyright" content="Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html">
+ <!-- meta name="Copyright" content="Copyright (c) 2002, International Business Machines Corporation and others. All Rights Reserved." -->
+ <meta name="Author" content="Eric Mader">
+ <meta name="GENERATOR" content="Mozilla/4.72 [en] (Windows NT 5.0; U) [Netscape]">
+ <title>ScriptRun readme</title>
+</head>
+<body>
+
+<h2>
+What is scrptrun and srtest?</h2>
+The ICU LayoutEngine must be called with text in a single script. scrptrun.h
+and scrptrun.cpp implement the ScriptRun class, which can be used to find
+runs of text that is in a single script. It uses a basic iteration interface.
+<p>srtest is a little program that tests ScriptRun. You can use it as an
+example of how to use ScriptRun. Here's what the output should look like:
+<blockquote><font face="Courier New,Courier"><font size=-1>Script 'DEVANAGARI'
+from 0 to 9.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'ARABIC' from
+9 to 17.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'CYRILLIC' from
+17 to 25.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'LATIN' from
+25 to 33.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'HAN' from 33
+to 35.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'HIRAGANA' from
+35 to 41.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'KATAKANA' from
+41 to 45.</font></font>
+<br><font face="Courier New,Courier"><font size=-1>Script 'DESERET' from
+45 to 53.</font></font></blockquote>
+
+<h2>
+How do I build scrptrun and srtest?</h2>
+To use the ScriptRun class in a Windows application, just include scrptrun.h
+and scrptrun.cpp right out of the &lt;icu>\source\extra\scrptrun directory
+into your project. You'll also need to add the &lt;icu>\source]extra\scrptrun
+directory to the "Additional include directories" section of the "Preprocessor"
+category on the "C/C++" tab in the project settings.
+<p>On UNIX systems the simplest thing to do is to just copy scrptrun.h
+and scrptrun.cpp into your source directory. If you want to use them from
+&lt;icu>/source/extra/scrpturn, it's a bit trickier: the default dependency
+rules don't work on source files in a different directory. You need to
+add separate dependency rules for scrptrun.o and scrptrun.d. See &lt;icu>/source/samples/layout/Makefile.in
+for an example of how to do this. You'll also have to add -I$(top_srcdir)/extra/scrptrun
+to your compiler flags so that the compiler can find scrptrun.h. If your
+application has to build on multiple UNIX platforms, it might be difficult
+to wirte dependency rules that will work correctly on all platforms. In
+that case, you're probably better off copying the scrpturn files to your
+source directory.
+<p>Building srtest is easy, on Windows build the srtest workspace in &lt;icu>\source\extra\scrptrun.
+On UNIX, connect to &lt;top-build-dir>/extra/scrptrun and do "make all"
+<h2>
+Notes</h2>
+
+<ul>
+<li>
+ScriptRun is based on <a href="http://www.unicode.org/unicode/reports/tr24/">Unicode
+Technical Report #24</a> but the implementation is not complete. In particular
+the support for paired punctuation is only a prototype. A complete implementation
+will be added to ICU in the future.</li>
+</ul>
+
+</body>
+</html>
diff --git a/intl/icu/source/extra/scrptrun/scrptrun.cpp b/intl/icu/source/extra/scrptrun/scrptrun.cpp
new file mode 100644
index 000000000..bd5105aaa
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/scrptrun.cpp
@@ -0,0 +1,203 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2016, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: scrptrun.cpp
+ *
+ * created on: 10/17/2001
+ * created by: Eric R. Mader
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/uscript.h"
+
+#include "cmemory.h"
+#include "scrptrun.h"
+
+const char ScriptRun::fgClassID=0;
+
+UChar32 ScriptRun::pairedChars[] = {
+ 0x0028, 0x0029, // ascii paired punctuation
+ 0x003c, 0x003e,
+ 0x005b, 0x005d,
+ 0x007b, 0x007d,
+ 0x00ab, 0x00bb, // guillemets
+ 0x2018, 0x2019, // general punctuation
+ 0x201c, 0x201d,
+ 0x2039, 0x203a,
+ 0x3008, 0x3009, // chinese paired punctuation
+ 0x300a, 0x300b,
+ 0x300c, 0x300d,
+ 0x300e, 0x300f,
+ 0x3010, 0x3011,
+ 0x3014, 0x3015,
+ 0x3016, 0x3017,
+ 0x3018, 0x3019,
+ 0x301a, 0x301b
+};
+
+const int32_t ScriptRun::pairedCharCount = UPRV_LENGTHOF(pairedChars);
+const int32_t ScriptRun::pairedCharPower = 1 << highBit(pairedCharCount);
+const int32_t ScriptRun::pairedCharExtra = pairedCharCount - pairedCharPower;
+
+int8_t ScriptRun::highBit(int32_t value)
+{
+ if (value <= 0) {
+ return -32;
+ }
+
+ int8_t bit = 0;
+
+ if (value >= 1 << 16) {
+ value >>= 16;
+ bit += 16;
+ }
+
+ if (value >= 1 << 8) {
+ value >>= 8;
+ bit += 8;
+ }
+
+ if (value >= 1 << 4) {
+ value >>= 4;
+ bit += 4;
+ }
+
+ if (value >= 1 << 2) {
+ value >>= 2;
+ bit += 2;
+ }
+
+ if (value >= 1 << 1) {
+ value >>= 1;
+ bit += 1;
+ }
+
+ return bit;
+}
+
+int32_t ScriptRun::getPairIndex(UChar32 ch)
+{
+ int32_t probe = pairedCharPower;
+ int32_t index = 0;
+
+ if (ch >= pairedChars[pairedCharExtra]) {
+ index = pairedCharExtra;
+ }
+
+ while (probe > (1 << 0)) {
+ probe >>= 1;
+
+ if (ch >= pairedChars[index + probe]) {
+ index += probe;
+ }
+ }
+
+ if (pairedChars[index] != ch) {
+ index = -1;
+ }
+
+ return index;
+}
+
+UBool ScriptRun::sameScript(int32_t scriptOne, int32_t scriptTwo)
+{
+ return scriptOne <= USCRIPT_INHERITED || scriptTwo <= USCRIPT_INHERITED || scriptOne == scriptTwo;
+}
+
+UBool ScriptRun::next()
+{
+ int32_t startSP = parenSP; // used to find the first new open character
+ UErrorCode error = U_ZERO_ERROR;
+
+ // if we've fallen off the end of the text, we're done
+ if (scriptEnd >= charLimit) {
+ return false;
+ }
+
+ scriptCode = USCRIPT_COMMON;
+
+ for (scriptStart = scriptEnd; scriptEnd < charLimit; scriptEnd += 1) {
+ UChar high = charArray[scriptEnd];
+ UChar32 ch = high;
+
+ // if the character is a high surrogate and it's not the last one
+ // in the text, see if it's followed by a low surrogate
+ if (high >= 0xD800 && high <= 0xDBFF && scriptEnd < charLimit - 1)
+ {
+ UChar low = charArray[scriptEnd + 1];
+
+ // if it is followed by a low surrogate,
+ // consume it and form the full character
+ if (low >= 0xDC00 && low <= 0xDFFF) {
+ ch = (high - 0xD800) * 0x0400 + low - 0xDC00 + 0x10000;
+ scriptEnd += 1;
+ }
+ }
+
+ UScriptCode sc = uscript_getScript(ch, &error);
+ int32_t pairIndex = getPairIndex(ch);
+
+ // Paired character handling:
+ //
+ // if it's an open character, push it onto the stack.
+ // if it's a close character, find the matching open on the
+ // stack, and use that script code. Any non-matching open
+ // characters above it on the stack will be poped.
+ if (pairIndex >= 0) {
+ if ((pairIndex & 1) == 0) {
+ parenStack[++parenSP].pairIndex = pairIndex;
+ parenStack[parenSP].scriptCode = scriptCode;
+ } else if (parenSP >= 0) {
+ int32_t pi = pairIndex & ~1;
+
+ while (parenSP >= 0 && parenStack[parenSP].pairIndex != pi) {
+ parenSP -= 1;
+ }
+
+ if (parenSP < startSP) {
+ startSP = parenSP;
+ }
+
+ if (parenSP >= 0) {
+ sc = parenStack[parenSP].scriptCode;
+ }
+ }
+ }
+
+ if (sameScript(scriptCode, sc)) {
+ if (scriptCode <= USCRIPT_INHERITED && sc > USCRIPT_INHERITED) {
+ scriptCode = sc;
+
+ // now that we have a final script code, fix any open
+ // characters we pushed before we knew the script code.
+ while (startSP < parenSP) {
+ parenStack[++startSP].scriptCode = scriptCode;
+ }
+ }
+
+ // if this character is a close paired character,
+ // pop it from the stack
+ if (pairIndex >= 0 && (pairIndex & 1) != 0 && parenSP >= 0) {
+ parenSP -= 1;
+ startSP -= 1;
+ }
+ } else {
+ // if the run broke on a surrogate pair,
+ // end it before the high surrogate
+ if (ch >= 0x10000) {
+ scriptEnd -= 1;
+ }
+
+ break;
+ }
+ }
+
+ return true;
+}
+
diff --git a/intl/icu/source/extra/scrptrun/scrptrun.h b/intl/icu/source/extra/scrptrun/scrptrun.h
new file mode 100644
index 000000000..b6b3a2b56
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/scrptrun.h
@@ -0,0 +1,156 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+ *******************************************************************************
+ *
+ * Copyright (C) 1999-2003, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ *******************************************************************************
+ * file name: scrptrun.h
+ *
+ * created on: 10/17/2001
+ * created by: Eric R. Mader
+ */
+
+#ifndef __SCRPTRUN_H
+#define __SCRPTRUN_H
+
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#include "unicode/uscript.h"
+
+struct ScriptRecord
+{
+ UChar32 startChar;
+ UChar32 endChar;
+ UScriptCode scriptCode;
+};
+
+struct ParenStackEntry
+{
+ int32_t pairIndex;
+ UScriptCode scriptCode;
+};
+
+class ScriptRun : public UObject {
+public:
+ ScriptRun();
+
+ ScriptRun(const UChar chars[], int32_t length);
+
+ ScriptRun(const UChar chars[], int32_t start, int32_t length);
+
+ void reset();
+
+ void reset(int32_t start, int32_t count);
+
+ void reset(const UChar chars[], int32_t start, int32_t length);
+
+ int32_t getScriptStart();
+
+ int32_t getScriptEnd();
+
+ UScriptCode getScriptCode();
+
+ UBool next();
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ *
+ * @stable ICU 2.2
+ */
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+
+ /**
+ * ICU "poor man's RTTI", returns a UClassID for this class.
+ *
+ * @stable ICU 2.2
+ */
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+
+private:
+
+ static UBool sameScript(int32_t scriptOne, int32_t scriptTwo);
+
+ int32_t charStart;
+ int32_t charLimit;
+ const UChar *charArray;
+
+ int32_t scriptStart;
+ int32_t scriptEnd;
+ UScriptCode scriptCode;
+
+ ParenStackEntry parenStack[128];
+ int32_t parenSP;
+
+ static int8_t highBit(int32_t value);
+ static int32_t getPairIndex(UChar32 ch);
+
+ static UChar32 pairedChars[];
+ static const int32_t pairedCharCount;
+ static const int32_t pairedCharPower;
+ static const int32_t pairedCharExtra;
+
+ /**
+ * The address of this static class variable serves as this class's ID
+ * for ICU "poor man's RTTI".
+ */
+ static const char fgClassID;
+};
+
+inline ScriptRun::ScriptRun()
+{
+ reset(NULL, 0, 0);
+}
+
+inline ScriptRun::ScriptRun(const UChar chars[], int32_t length)
+{
+ reset(chars, 0, length);
+}
+
+inline ScriptRun::ScriptRun(const UChar chars[], int32_t start, int32_t length)
+{
+ reset(chars, start, length);
+}
+
+inline int32_t ScriptRun::getScriptStart()
+{
+ return scriptStart;
+}
+
+inline int32_t ScriptRun::getScriptEnd()
+{
+ return scriptEnd;
+}
+
+inline UScriptCode ScriptRun::getScriptCode()
+{
+ return scriptCode;
+}
+
+inline void ScriptRun::reset()
+{
+ scriptStart = charStart;
+ scriptEnd = charStart;
+ scriptCode = USCRIPT_INVALID_CODE;
+ parenSP = -1;
+}
+
+inline void ScriptRun::reset(int32_t start, int32_t length)
+{
+ charStart = start;
+ charLimit = start + length;
+
+ reset();
+}
+
+inline void ScriptRun::reset(const UChar chars[], int32_t start, int32_t length)
+{
+ charArray = chars;
+
+ reset(start, length);
+}
+
+
+#endif
diff --git a/intl/icu/source/extra/scrptrun/srtest.cpp b/intl/icu/source/extra/scrptrun/srtest.cpp
new file mode 100644
index 000000000..d4ec8506d
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/srtest.cpp
@@ -0,0 +1,41 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+ * %W% %E%
+ *
+ * (C) Copyright IBM Corp. 2001-2016 - All Rights Reserved
+ *
+ */
+
+#include "unicode/utypes.h"
+#include "unicode/uscript.h"
+
+#include "cmemory.h"
+#include "scrptrun.h"
+
+#include <stdio.h>
+
+UChar testChars[] = {
+ 0x0020, 0x0946, 0x0939, 0x093F, 0x0928, 0x094D, 0x0926, 0x0940, 0x0020,
+ 0x0627, 0x0644, 0x0639, 0x0631, 0x0628, 0x064A, 0x0629, 0x0020,
+ 0x0420, 0x0443, 0x0441, 0x0441, 0x043A, 0x0438, 0x0439, 0x0020,
+ 'E', 'n', 'g', 'l', 'i', 's', 'h', 0x0020,
+ 0x6F22, 0x5B75, 0x3068, 0x3072, 0x3089, 0x304C, 0x306A, 0x3068,
+ 0x30AB, 0x30BF, 0x30AB, 0x30CA,
+ 0xD801, 0xDC00, 0xD801, 0xDC01, 0xD801, 0xDC02, 0xD801, 0xDC03
+};
+
+int32_t testLength = UPRV_LENGTHOF(testChars);
+
+void main()
+{
+ ScriptRun scriptRun(testChars, 0, testLength);
+
+ while (scriptRun.next()) {
+ int32_t start = scriptRun.getScriptStart();
+ int32_t end = scriptRun.getScriptEnd();
+ UScriptCode code = scriptRun.getScriptCode();
+
+ printf("Script '%s' from %d to %d.\n", uscript_getName(code), start, end);
+ }
+}
diff --git a/intl/icu/source/extra/scrptrun/srtest.dsp b/intl/icu/source/extra/scrptrun/srtest.dsp
new file mode 100644
index 000000000..f5e23dfdb
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/srtest.dsp
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Project File - Name="srtest" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=srtest - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "srtest.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "srtest.mak" CFG="srtest - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "srtest - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "srtest - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "srtest - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ..\..\..\lib\icuuc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "srtest - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\..\lib\icuucd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "srtest - Win32 Release"
+# Name "srtest - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\scrptrun.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\srtest.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\scrptrun.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/intl/icu/source/extra/scrptrun/srtest.dsw b/intl/icu/source/extra/scrptrun/srtest.dsw
new file mode 100644
index 000000000..6609c4f20
--- /dev/null
+++ b/intl/icu/source/extra/scrptrun/srtest.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "srtest"=.\srtest.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+