diff options
Diffstat (limited to 'Build/source/libs/icu/icu-xetex/test/perf')
68 files changed, 15320 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl new file mode 100755 index 00000000000..ef5e1cf2e9e --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Character property performance: ICU vs. STDLib", + "headers"=>"StdLib ICU", + "operationIs"=>"code point", + "timePerOperationIs"=>"Time per code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"../results" + }; + + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "charperf.exe"; + +my $tests = { +"isAlpha", ["$p TestStdLibIsAlpha" , "$p TestIsAlpha" ], +"isUpper", ["$p TestStdLibIsUpper" , "$p TestIsUpper" ], +"isLower", ["$p TestStdLibIsLower" , "$p TestIsLower" ], +"isDigit", ["$p TestStdLibIsDigit" , "$p TestIsDigit" ], +"isSpace", ["$p TestStdLibIsSpace" , "$p TestIsSpace" ], +"isAlphaNumeric", ["$p TestStdLibIsAlphaNumeric" , "$p TestIsAlphaNumeric" ], +"isPrint", ["$p TestStdLibIsPrint" , "$p TestIsPrint" ], +"isControl", ["$p TestStdLibIsControl" , "$p TestIsControl" ], +"toLower", ["$p TestStdLibToLower" , "$p TestToLower" ], +"toUpper", ["$p TestStdLibToUpper" , "$p TestToUpper" ], +"isWhiteSpace", ["$p TestStdLibIsWhiteSpace" , "$p TestIsWhiteSpace" ], +}; + +my $dataFiles; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl new file mode 100644 index 00000000000..a6f95842e8f --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/CharPerf_r.pl @@ -0,0 +1,51 @@ +#!/usr/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2007, International Business Machines +# * Corporation and others. All Rights Reserved. +# ******************************************************************** + +use strict; + +#Assume we are running outside of the icu source +use lib './icu-3.0/icu/source/test/perf/perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Character property performance regression (ICU 2.8 and 3.0)", + "headers"=>"ICU28 ICU30", + "operationIs"=>"code point", + "timePerOperationIs"=>"Time per code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"results_ICU4C" + }; + +# programs + +my $p1 = "icu-2.8/icu/bin/charperf28.exe"; +my $p2 = "icu-3.0/icu/bin/charperf30.exe"; + +my $dataFiles = ""; + + +my $tests = { +"isAlpha", ["$p1 TestIsAlpha" , "$p2 TestIsAlpha" ], +"isUpper", ["$p1 TestIsUpper" , "$p2 TestIsUpper" ], +"isLower", ["$p1 TestIsLower" , "$p2 TestIsLower" ], +"isDigit", ["$p1 TestIsDigit" , "$p2 TestIsDigit" ], +"isSpace", ["$p1 TestIsSpace" , "$p2 TestIsSpace" ], +"isAlphaNumeric", ["$p1 TestIsAlphaNumeric" , "$p2 TestIsAlphaNumeric" ], +"isPrint", ["$p1 TestIsPrint" , "$p2 TestIsPrint" ], +"isControl", ["$p1 TestIsControl" , "$p2 TestIsControl" ], +"toLower", ["$p1 TestToLower" , "$p2 TestToLower" ], +"toUpper", ["$p1 TestToUpper" , "$p2 TestToUpper" ], +"isWhiteSpace", ["$p1 TestIsWhiteSpace" , "$p2 TestIsWhiteSpace" ], +}; + +runTests($options, $tests, $dataFiles); + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in new file mode 100644 index 00000000000..610b90d84ca --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/charperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/charperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = charperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = charperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp new file mode 100644 index 00000000000..c964625bf2f --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.cpp @@ -0,0 +1,255 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (C) 2002-2006 IBM, Inc. All Rights Reserved. + * + ********************************************************************/ +/***************************************************************************** +* File charperf.cpp +* +* Modification History: +* Name Description +* Syn Wee Quek First Version +****************************************************************************** +*/ + +/** + * This program tests character properties performance. + * APIs tested: + * ICU4C + * Windows + */ + +#include "charperf.h" +#include "uoptions.h" + +UOption options[] = { + UOPTION_DEF("min", 'n', UOPT_REQUIRES_ARG), + UOPTION_DEF("min", 'x', UOPT_REQUIRES_ARG), +}; +int MIN_OPTION_ = 0; +int MAX_OPTION_ = 1; + +int main(int argc, const char *argv[]) +{ + UErrorCode status = U_ZERO_ERROR; + CharPerformanceTest test(argc, argv, status); + if (U_FAILURE(status)){ + return status; + } + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + return 0; +} + +CharPerformanceTest::CharPerformanceTest(int32_t argc, const char *argv[], + UErrorCode &status) + : UPerfTest(argc, argv, status) +{ + if (status== U_ILLEGAL_ARGUMENT_ERROR){ + fprintf(stderr,gUsageString, "charperf"); + return; + } + if (U_FAILURE(status)){ + fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", + u_errorName(status)); + return; + } + + if (_remainingArgc < 0) { + // that means there are some -names not matched in the super class + // first tag is always skipped in u_parseArgs + int size = - _remainingArgc; + argv += argc - size; + argc = size; + _remainingArgc = u_parseArgs(argc, (char**)argv, + (int32_t)(sizeof(options)/sizeof(options[0])), options); + } + MIN_ = 0; + if (sizeof(wchar_t) > 2) { + // for stdlibs like glibc that supports 32 bits wchar + // we test for the whole unicode character set by default + MAX_ = 0x10ffff; + } + else { + MAX_ = 0xffff; + } + printf("MAX_ size will be 0x%x\n", MAX_); + if (options[MIN_OPTION_].doesOccur) { + MIN_ = atoi(options[MIN_OPTION_].value); + } + if (options[MAX_OPTION_].doesOccur) { + MAX_ = atoi(options[MAX_OPTION_].value); + } +} + +CharPerformanceTest::~CharPerformanceTest() +{ +} + +UPerfFunction* CharPerformanceTest::runIndexedTest(int32_t index, UBool exec, + const char *&name, + char* par) +{ + switch (index) { + TESTCASE(0, TestIsAlpha); + TESTCASE(1, TestIsUpper); + TESTCASE(2, TestIsLower); + TESTCASE(3, TestIsDigit); + TESTCASE(4, TestIsSpace); + TESTCASE(5, TestIsAlphaNumeric); + TESTCASE(6, TestIsPrint); + TESTCASE(7, TestIsControl); + TESTCASE(8, TestToLower); + TESTCASE(9, TestToUpper); + TESTCASE(10, TestIsWhiteSpace); + TESTCASE(11, TestStdLibIsAlpha); + TESTCASE(12, TestStdLibIsUpper); + TESTCASE(13, TestStdLibIsLower); + TESTCASE(14, TestStdLibIsDigit); + TESTCASE(15, TestStdLibIsSpace); + TESTCASE(16, TestStdLibIsAlphaNumeric); + TESTCASE(17, TestStdLibIsPrint); + TESTCASE(18, TestStdLibIsControl); + TESTCASE(19, TestStdLibToLower); + TESTCASE(20, TestStdLibToUpper); + TESTCASE(21, TestStdLibIsWhiteSpace); + default: + name = ""; + return NULL; + } + return NULL; +} + +UPerfFunction* CharPerformanceTest::TestIsAlpha() +{ + return new CharPerfFunction(isAlpha, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsUpper() +{ + return new CharPerfFunction(isUpper, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsLower() +{ + return new CharPerfFunction(isLower, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsDigit() +{ + return new CharPerfFunction(isDigit, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsSpace() +{ + return new CharPerfFunction(isSpace, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsAlphaNumeric() +{ + return new CharPerfFunction(isAlphaNumeric, MIN_, MAX_); +} + +/** +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ +UPerfFunction* CharPerformanceTest::TestIsPrint() +{ + return new CharPerfFunction(isPrint, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsControl() +{ + return new CharPerfFunction(isControl, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestToLower() +{ + return new CharPerfFunction(toLower, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestToUpper() +{ + return new CharPerfFunction(toUpper, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestIsWhiteSpace() +{ + return new CharPerfFunction(isWhiteSpace, MIN_, MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsAlpha() +{ + return new StdLibCharPerfFunction(StdLibIsAlpha, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsUpper() +{ + return new StdLibCharPerfFunction(StdLibIsUpper, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsLower() +{ + return new StdLibCharPerfFunction(StdLibIsLower, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsDigit() +{ + return new StdLibCharPerfFunction(StdLibIsDigit, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsSpace() +{ + return new StdLibCharPerfFunction(StdLibIsSpace, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsAlphaNumeric() +{ + return new StdLibCharPerfFunction(StdLibIsAlphaNumeric, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +/** +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ +UPerfFunction* CharPerformanceTest::TestStdLibIsPrint() +{ + return new StdLibCharPerfFunction(StdLibIsPrint, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsControl() +{ + return new StdLibCharPerfFunction(StdLibIsControl, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibToLower() +{ + return new StdLibCharPerfFunction(StdLibToLower, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibToUpper() +{ + return new StdLibCharPerfFunction(StdLibToUpper, (wchar_t)MIN_, + (wchar_t)MAX_); +} + +UPerfFunction* CharPerformanceTest::TestStdLibIsWhiteSpace() +{ + return new StdLibCharPerfFunction(StdLibIsWhiteSpace, (wchar_t)MIN_, + (wchar_t)MAX_); +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h new file mode 100644 index 00000000000..e23785f84cb --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.h @@ -0,0 +1,239 @@ +/* +********************************************************************** +* Copyright (c) 2002-2006, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +#ifndef _CHARPERF_H +#define _CHARPERF_H + +#include "unicode/uchar.h" + +#include "unicode/uperf.h" +#include <stdlib.h> +#include <stdio.h> +#include <wchar.h> +#include <wctype.h> + +typedef void (*CharPerfFn)(UChar32 ch); +typedef void (*StdLibCharPerfFn)(wchar_t ch); + +class CharPerfFunction : public UPerfFunction +{ +public: + virtual void call(UErrorCode* status) + { + for (UChar32 i = MIN_; i < MAX_; i ++) { + (*m_fn_)(i); + } + } + + virtual long getOperationsPerIteration() + { + return MAX_ - MIN_; + } + CharPerfFunction(CharPerfFn func, UChar32 min, UChar32 max) + { + m_fn_ = func; + MIN_ = min; + MAX_ = max; + } + +private: + CharPerfFn m_fn_; + UChar32 MIN_; + UChar32 MAX_; +}; + +class StdLibCharPerfFunction : public UPerfFunction +{ +public: + virtual void call(UErrorCode* status) + { + // note wchar_t is unsigned, it will revert to 0 once it reaches + // 65535 + for (wchar_t i = MIN_; i < MAX_; i ++) { + (*m_fn_)(i); + } + } + + virtual long getOperationsPerIteration() + { + return MAX_ - MIN_; + } + + StdLibCharPerfFunction(StdLibCharPerfFn func, wchar_t min, wchar_t max) + { + m_fn_ = func; + MIN_ = min; + MAX_ = max; + } + + ~StdLibCharPerfFunction() + { + } + +private: + StdLibCharPerfFn m_fn_; + wchar_t MIN_; + wchar_t MAX_; +}; + +class CharPerformanceTest : public UPerfTest +{ +public: + CharPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status); + ~CharPerformanceTest(); + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, + const char *&name, + char *par = NULL); + UPerfFunction* TestIsAlpha(); + UPerfFunction* TestIsUpper(); + UPerfFunction* TestIsLower(); + UPerfFunction* TestIsDigit(); + UPerfFunction* TestIsSpace(); + UPerfFunction* TestIsAlphaNumeric(); + UPerfFunction* TestIsPrint(); + UPerfFunction* TestIsControl(); + UPerfFunction* TestToLower(); + UPerfFunction* TestToUpper(); + UPerfFunction* TestIsWhiteSpace(); + UPerfFunction* TestStdLibIsAlpha(); + UPerfFunction* TestStdLibIsUpper(); + UPerfFunction* TestStdLibIsLower(); + UPerfFunction* TestStdLibIsDigit(); + UPerfFunction* TestStdLibIsSpace(); + UPerfFunction* TestStdLibIsAlphaNumeric(); + UPerfFunction* TestStdLibIsPrint(); + UPerfFunction* TestStdLibIsControl(); + UPerfFunction* TestStdLibToLower(); + UPerfFunction* TestStdLibToUpper(); + UPerfFunction* TestStdLibIsWhiteSpace(); + +private: + UChar32 MIN_; + UChar32 MAX_; +}; + +inline void isAlpha(UChar32 ch) +{ + u_isalpha(ch); +} + +inline void isUpper(UChar32 ch) +{ + u_isupper(ch); +} + +inline void isLower(UChar32 ch) +{ + u_islower(ch); +} + +inline void isDigit(UChar32 ch) +{ + u_isdigit(ch); +} + +inline void isSpace(UChar32 ch) +{ + u_isspace(ch); +} + +inline void isAlphaNumeric(UChar32 ch) +{ + u_isalnum(ch); +} + +/** +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ +inline void isPrint(UChar32 ch) +{ + u_isprint(ch); +} + +inline void isControl(UChar32 ch) +{ + u_iscntrl(ch); +} + +inline void toLower(UChar32 ch) +{ + u_tolower(ch); +} + +inline void toUpper(UChar32 ch) +{ + u_toupper(ch); +} + +inline void isWhiteSpace(UChar32 ch) +{ + u_isWhitespace(ch); +} + +inline void StdLibIsAlpha(wchar_t ch) +{ + iswalpha(ch); +} + +inline void StdLibIsUpper(wchar_t ch) +{ + iswupper(ch); +} + +inline void StdLibIsLower(wchar_t ch) +{ + iswlower(ch); +} + +inline void StdLibIsDigit(wchar_t ch) +{ + iswdigit(ch); +} + +inline void StdLibIsSpace(wchar_t ch) +{ + iswspace(ch); +} + +inline void StdLibIsAlphaNumeric(wchar_t ch) +{ + iswalnum(ch); +} + +/** +* This test may be different since c lib has a type PUNCT and it is printable. +* iswgraph is not used for testing since it is a subset of iswprint with the +* exception of returning true for white spaces. no match found in icu4c. +*/ +inline void StdLibIsPrint(wchar_t ch) +{ + iswprint(ch); +} + +inline void StdLibIsControl(wchar_t ch) +{ + iswcntrl(ch); +} + +inline void StdLibToLower(wchar_t ch) +{ + towlower(ch); +} + +inline void StdLibToUpper(wchar_t ch) +{ + towupper(ch); +} + +inline void StdLibIsWhiteSpace(wchar_t ch) +{ + iswspace(ch); +} + +#endif // CHARPERF_H diff --git a/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj new file mode 100644 index 00000000000..d6f276a0a8b --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/charperf/charperf.vcproj @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="charperf" + ProjectGUID="{D850A4B6-7D94-476E-9392-E9272DA4EAAF}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/charperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Debug/charperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib" + OutputFile=".\Debug/charperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/charperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/charperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Release/charperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + OutputFile=".\Release/charperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib" + ProgramDatabaseFile=".\Release/charperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="charperf.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="charperf.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl new file mode 100755 index 00000000000..78c69f3549c --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/CollPerf.pl @@ -0,0 +1,82 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Collation performance: ICU,POSIX,and Win", + "headers"=>"ICU_POSIX_WIN", + "operationIs"=>"unicode String", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"../data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "debug/collperf.exe "; + +my $tests = { + "Key Gen ICU null", ["$p TestIcu_KeyGen_null"], + "Key Gen ICU len", ["$p TestIcu_KeyGen_len"], + "Key Gen POSIX", ["$p TestPosix_KeyGen_null"], + "Key Gen Win", ["$p TestWin_KeyGen_null"], + "Iteration icu forward null", ["$p TestIcu_ForwardIter_null"], + "Iteration icu forward len", ["$p TestIcu_ForwardIter_len"], + "Iteration icu backward null", ["$p TestIcu_BackwardIter_null"], + "Iteration icu backward len", ["$p TestIcu_BackwardIter_len"], + "Iteration/all icu forward null", ["$p TestIcu_ForwardIter_all_null"], + "Iteration/all icu forward len", ["$p TestIcu_ForwardIter_all_len"], + "Iteration/all icu backward null", ["$p TestIcu_BackwardIter_all_null"], + "Iteration/all icu backward len", ["$p TestIcu_BackwardIter_all_len"], + "qsort icu strcoll null", ["$p TestIcu_qsort_strcoll_null"], + "qsort icu strcoll len", ["$p TestIcu_qsort_strcoll_len"], + "qsort icu use key", ["$p TestIcu_qsort_usekey"], + "qsort posix strcoll null", ["$p TestPosix_qsort_strcoll_null"], + "qsort posix use key", ["$p TestPosix_qsort_usekey"], + "qsort win CompareStringW null", ["$p TestWin_qsort_CompareStringW_null"], + "qsort win CompareStringW len", ["$p TestWin_qsort_CompareStringW_len"], + "qsort win use key", ["$p TestWin_qsort_usekey"], + "Binary Search icu strcoll null", ["$p TestIcu_BinarySearch_strcoll_null"], + "Binary Search icu strcoll len", ["$p TestIcu_BinarySearch_strcoll_len"], + "Binary Search icu use key", ["$p TestIcu_BinarySearch_usekey"], + "Binary Search icu u_strcmp", ["$p TestIcu_BinarySearch_strcmp"], + "Binary Search icu cmpCPO", ["$p TestIcu_BinarySearch_cmpCPO"], + "Binary Search posix strcoll null", ["$p TestPosix_BinarySearch_strcoll_null"], + "Binary Search posix use key", ["$p TestPosix_BinarySearch_usekey"], + "Binary Search win CompareStringW null", ["$p TestWin_BinarySearch_CompareStringW_null"], + "Binary Search win CompareStringW len", ["$p TestWin_BinarySearch_CompareStringW_len"], + "Binary Search win use key", ["$p TestWin_BinarySearch_usekey"], + "Binary Search win wcscmp", ["$p TestWin_BinarySearch_wcscmp"], + }; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", +# "TestNames_Chinese.txt", +# "TestNames_Japanese.txt", +# "TestNames_Japanese_h.txt", +# "TestNames_Japanese_k.txt", +# "TestNames_Korean.txt", +# "TestNames_Latin.txt", +# "Testnames_Russian.txt", +# "TestNames_SerbianSH.txt", +# "TestNames_SerbianSR.txt", +# "TestNames_Simplified_Chinese.txt", +# "TestNames_Thai.txt" + ] + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in new file mode 100644 index 00000000000..fcc1615b3fb --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/collperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/collperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = collperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = collperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp new file mode 100644 index 00000000000..fd30f50bdea --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.cpp @@ -0,0 +1,880 @@ +/******************************************************************** +* COPYRIGHT: +* Copyright (C) 2001-2006 IBM, Inc. All Rights Reserved. +* +********************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include <locale.h> +#include <limits.h> +#include <string.h> +#include "unicode/uperf.h" +#include "uoptions.h" +#include "unicode/coll.h" +#include <unicode/ucoleitr.h> + + + +/* To store an array of string<UNIT> in continue space. +Since string<UNIT> itself is treated as an array of UNIT, this +class will ease our memory management for an array of string<UNIT>. +*/ + +//template<typename UNIT> +#define COMPATCT_ARRAY(CompactArrays, UNIT) \ +struct CompactArrays{\ + CompactArrays(const CompactArrays & );\ + CompactArrays & operator=(const CompactArrays & );\ + int32_t count;/*total number of the strings*/ \ + int32_t * index;/*relative offset in data*/ \ + UNIT * data; /*the real space to hold strings*/ \ + \ + ~CompactArrays(){free(index);free(data);} \ + CompactArrays():data(NULL), index(NULL), count(0){ \ + index = (int32_t *) realloc(index, sizeof(int32_t)); \ + index[0] = 0; \ + } \ + void append_one(int32_t theLen){ /*include terminal NULL*/ \ + count++; \ + index = (int32_t *) realloc(index, sizeof(int32_t) * (count + 1)); \ + index[count] = index[count - 1] + theLen; \ + data = (UNIT *) realloc(data, sizeof(UNIT) * index[count]); \ + } \ + UNIT * last(){return data + index[count - 1];} \ + UNIT * dataOf(int32_t i){return data + index[i];} \ + int32_t lengthOf(int i){return index[i+1] - index[i] - 1; } /*exclude terminating NULL*/ \ +}; + +//typedef CompactArrays<UChar> CA_uchar; +//typedef CompactArrays<char> CA_char; +//typedef CompactArrays<uint8_t> CA_uint8; +//typedef CompactArrays<WCHAR> CA_win_wchar; + +COMPATCT_ARRAY(CA_uchar, UChar) +COMPATCT_ARRAY(CA_char, char) +COMPATCT_ARRAY(CA_uint8, uint8_t) +COMPATCT_ARRAY(CA_win_wchar, WCHAR) + + +struct DataIndex { + static DWORD win_langid; // for qsort callback function + static UCollator * col; // for qsort callback function + uint8_t * icu_key; + UChar * icu_data; + int32_t icu_data_len; + char* posix_key; + char* posix_data; + int32_t posix_data_len; + char* win_key; + WCHAR * win_data; + int32_t win_data_len; +}; +DWORD DataIndex::win_langid; +UCollator * DataIndex::col; + + + +class CmdKeyGen : public UPerfFunction { + typedef void (CmdKeyGen::* Func)(int32_t); + enum{MAX_KEY_LENGTH = 5000}; + UCollator * col; + DWORD win_langid; + int32_t count; + DataIndex * data; + Func fn; + + union { // to save sapce + uint8_t icu_key[MAX_KEY_LENGTH]; + char posix_key[MAX_KEY_LENGTH]; + WCHAR win_key[MAX_KEY_LENGTH]; + }; +public: + CmdKeyGen(UErrorCode, UCollator * col,DWORD win_langid, int32_t count, DataIndex * data,Func fn,int32_t) + :col(col),win_langid(win_langid), count(count), data(data), fn(fn){} + + virtual long getOperationsPerIteration(){return count;} + + virtual void call(UErrorCode* status){ + for(int32_t i = 0; i< count; i++){ + (this->*fn)(i); + } + } + + void icu_key_null(int32_t i){ + ucol_getSortKey(col, data[i].icu_data, -1, icu_key, MAX_KEY_LENGTH); + } + + void icu_key_len(int32_t i){ + ucol_getSortKey(col, data[i].icu_data, data[i].icu_data_len, icu_key, MAX_KEY_LENGTH); + } + + // pre-generated in CollPerfTest::prepareData(), need not to check error here + void win_key_null(int32_t i){ + //LCMAP_SORTsk 0x00000400 // WC sort sk (normalize) + LCMapStringW(win_langid, LCMAP_SORTKEY, data[i].win_data, -1, win_key, MAX_KEY_LENGTH); + } + + void win_key_len(int32_t i){ + LCMapStringW(win_langid, LCMAP_SORTKEY, data[i].win_data, data[i].win_data_len, win_key, MAX_KEY_LENGTH); + } + + void posix_key_null(int32_t i){ + strxfrm(posix_key, data[i].posix_data, MAX_KEY_LENGTH); + } +}; + + +class CmdIter : public UPerfFunction { + typedef void (CmdIter::* Func)(UErrorCode* , int32_t ); + int32_t count; + CA_uchar * data; + Func fn; + UCollationElements *iter; + int32_t exec_count; +public: + CmdIter(UErrorCode & status, UCollator * col, int32_t count, CA_uchar *data, Func fn, int32_t,int32_t) + :count(count), data(data), fn(fn){ + exec_count = 0; + UChar dummytext[] = {0, 0}; + iter = ucol_openElements(col, NULL, 0, &status); + ucol_setText(iter, dummytext, 1, &status); + } + ~CmdIter(){ + ucol_closeElements(iter); + } + + virtual long getOperationsPerIteration(){return exec_count ? exec_count : 1;} + + virtual void call(UErrorCode* status){ + exec_count = 0; + for(int32_t i = 0; i< count; i++){ + (this->*fn)(status, i); + } + } + + void icu_forward_null(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), -1, status); + while (ucol_next(iter, status) != UCOL_NULLORDER) exec_count++; + } + + void icu_forward_len(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), data->lengthOf(i) , status); + while (ucol_next(iter, status) != UCOL_NULLORDER) exec_count++; + } + + void icu_backward_null(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), -1, status); + while (ucol_previous(iter, status) != UCOL_NULLORDER) exec_count++; + } + + void icu_backward_len(UErrorCode* status, int32_t i){ + ucol_setText(iter, data->dataOf(i), data->lengthOf(i) , status); + while (ucol_previous(iter, status) != UCOL_NULLORDER) exec_count++; + } +}; + +class CmdIterAll : public UPerfFunction { + typedef void (CmdIterAll::* Func)(UErrorCode* status); + int32_t count; + UChar * data; + Func fn; + UCollationElements *iter; + int32_t exec_count; + +public: + enum CALL {forward_null, forward_len, backward_null, backward_len}; + + ~CmdIterAll(){ + ucol_closeElements(iter); + } + CmdIterAll(UErrorCode & status, UCollator * col, int32_t count, UChar * data, CALL call,int32_t,int32_t) + :count(count),data(data) + { + exec_count = 0; + if (call == forward_null || call == backward_null) { + iter = ucol_openElements(col, data, -1, &status); + } else { + iter = ucol_openElements(col, data, count, &status); + } + + if (call == forward_null || call == forward_len){ + fn = &CmdIterAll::icu_forward_all; + } else { + fn = &CmdIterAll::icu_backward_all; + } + } + virtual long getOperationsPerIteration(){return exec_count ? exec_count : 1;} + + virtual void call(UErrorCode* status){ + (this->*fn)(status); + } + + void icu_forward_all(UErrorCode* status){ + int strlen = count - 5; + int count5 = 5; + int strindex = 0; + ucol_setOffset(iter, strindex, status); + while (TRUE) { + if (ucol_next(iter, status) == UCOL_NULLORDER) { + break; + } + exec_count++; + count5 --; + if (count5 == 0) { + strindex += 10; + if (strindex > strlen) { + break; + } + ucol_setOffset(iter, strindex, status); + count5 = 5; + } + } + } + + void icu_backward_all(UErrorCode* status){ + int strlen = count; + int count5 = 5; + int strindex = 5; + ucol_setOffset(iter, strindex, status); + while (TRUE) { + if (ucol_previous(iter, status) == UCOL_NULLORDER) { + break; + } + exec_count++; + count5 --; + if (count5 == 0) { + strindex += 10; + if (strindex > strlen) { + break; + } + ucol_setOffset(iter, strindex, status); + count5 = 5; + } + } + } + +}; + +struct CmdQsort : public UPerfFunction{ + + static int q_random(const void * a, const void * b){ + uint8_t * key_a = ((DataIndex *)a)->icu_key; + uint8_t * key_b = ((DataIndex *)b)->icu_key; + + int val_a = 0; + int val_b = 0; + while (*key_a != 0) {val_a += val_a*37 + *key_a++;} + while (*key_b != 0) {val_b += val_b*37 + *key_b++;} + return val_a - val_b; + } + +#define QCAST() \ + DataIndex * da = (DataIndex *) a; \ + DataIndex * db = (DataIndex *) b; \ + ++exec_count + + static int icu_strcoll_null(const void *a, const void *b){ + QCAST(); + return ucol_strcoll(da->col, da->icu_data, -1, db->icu_data, -1) - UCOL_EQUAL; + } + + static int icu_strcoll_len(const void *a, const void *b){ + QCAST(); + return ucol_strcoll(da->col, da->icu_data, da->icu_data_len, db->icu_data, db->icu_data_len) - UCOL_EQUAL; + } + + static int icu_cmpkey (const void *a, const void *b){ + QCAST(); + return strcmp((char *) da->icu_key, (char *) db->icu_key); + } + + static int win_cmp_null(const void *a, const void *b) { + QCAST(); + //CSTR_LESS_THAN 1 + //CSTR_EQUAL 2 + //CSTR_GREATER_THAN 3 + int t = CompareStringW(da->win_langid, 0, da->win_data, -1, db->win_data, -1); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + + static int win_cmp_len(const void *a, const void *b) { + QCAST(); + int t = CompareStringW(da->win_langid, 0, da->win_data, da->win_data_len, db->win_data, db->win_data_len); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + +#define QFUNC(name, func, data) \ + static int name (const void *a, const void *b){ \ + QCAST(); \ + return func(da->data, db->data); \ + } + + QFUNC(posix_strcoll_null, strcoll, posix_data) + QFUNC(posix_cmpkey, strcmp, posix_key) + QFUNC(win_cmpkey, strcmp, win_key) + QFUNC(win_wcscmp, wcscmp, win_data) + QFUNC(icu_strcmp, u_strcmp, icu_data) + QFUNC(icu_cmpcpo, u_strcmpCodePointOrder, icu_data) + +private: + static int32_t exec_count; // potential muilt-thread problem + + typedef int (* Func)(const void *, const void *); + + Func fn; + void * base; //Start of target array. + int32_t num; //Array size in elements. + int32_t width; //Element size in bytes. + + void * backup; //copy source of base +public: + CmdQsort(UErrorCode & status,void *theBase, int32_t num, int32_t width, Func fn, int32_t,int32_t) + :backup(theBase),num(num),width(width),fn(fn){ + base = malloc(num * width); + time_empty(100, &status); // warm memory/cache + } + + ~CmdQsort(){ + free(base); + } + + void empty_call(){ + exec_count = 0; + memcpy(base, backup, num * width); + } + + double time_empty(int32_t n, UErrorCode* status) { + UTimer start, stop; + utimer_getTime(&start); + while (n-- > 0) { + empty_call(); + } + utimer_getTime(&stop); + return utimer_getDeltaSeconds(&start,&stop); // ms + } + + virtual void call(UErrorCode* status){ + exec_count = 0; + memcpy(base, backup, num * width); + qsort(base, num, width, fn); + } + virtual double time(int32_t n, UErrorCode* status) { + double t1 = time_empty(n,status); + double t2 = UPerfFunction::time(n, status); + return t2-t1;// < 0 ? t2 : t2-t1; + } + + virtual long getOperationsPerIteration(){ return exec_count?exec_count:1;} +}; +int32_t CmdQsort::exec_count; + + +class CmdBinSearch : public UPerfFunction{ +public: + typedef int (CmdBinSearch::* Func)(int, int); + + UCollator * col; + DWORD win_langid; + int32_t count; + DataIndex * rnd; + DataIndex * ord; + Func fn; + int32_t exec_count; + + CmdBinSearch(UErrorCode, UCollator * col,DWORD win_langid,int32_t count,DataIndex * rnd,DataIndex * ord,Func fn) + :col(col),win_langid(win_langid), count(count), rnd(rnd), ord(ord), fn(fn),exec_count(0){} + + + virtual void call(UErrorCode* status){ + exec_count = 0; + for(int32_t i = 0; i< count; i++){ // search all data + binary_search(i); + } + } + virtual long getOperationsPerIteration(){ return exec_count?exec_count:1;} + + void binary_search(int32_t random) { + int low = 0; + int high = count - 1; + int guess; + int last_guess = -1; + int r; + while (TRUE) { + guess = (high + low)/2; + if (last_guess == guess) break; // nothing to search + + r = (this->*fn)(random, guess); + exec_count++; + + if (r == 0) + return; // found, search end. + if (r < 0) { + high = guess; + } else { + low = guess; + } + last_guess = guess; + } + } + + int icu_strcoll_null(int32_t i, int32_t j){ + return ucol_strcoll(col, rnd[i].icu_data, -1, ord[j].icu_data,-1); + } + + int icu_strcoll_len(int32_t i, int32_t j){ + return ucol_strcoll(col, rnd[i].icu_data, rnd[i].icu_data_len, ord[j].icu_data, ord[j].icu_data_len); + } + + int icu_cmpkey(int32_t i, int32_t j) { + return strcmp( (char *) rnd[i].icu_key, (char *) ord[j].icu_key ); + } + + int win_cmp_null(int32_t i, int32_t j) { + int t = CompareStringW(win_langid, 0, rnd[i].win_data, -1, ord[j].win_data, -1); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + + int win_cmp_len(int32_t i, int32_t j) { + int t = CompareStringW(win_langid, 0, rnd[i].win_data, rnd[i].win_data_len, ord[j].win_data, ord[j].win_data_len); + if (t == 0){ + fprintf(stderr, "CompareStringW error, error number %x\n", GetLastError()); + exit(-1); + } else{ + return t - CSTR_EQUAL; + } + } + +#define BFUNC(name, func, data) \ + int name(int32_t i, int32_t j) { \ + return func(rnd[i].data, ord[j].data); \ + } + + BFUNC(posix_strcoll_null, strcoll, posix_data) + BFUNC(posix_cmpkey, strcmp, posix_key) + BFUNC(win_cmpkey, strcmp, win_key) + BFUNC(win_wcscmp, wcscmp, win_data) + BFUNC(icu_strcmp, u_strcmp, icu_data) + BFUNC(icu_cmpcpo, u_strcmpCodePointOrder, icu_data) +}; + +class CollPerfTest : public UPerfTest { +public: + UCollator * col; + DWORD win_langid; + + UChar * icu_data_all; + int32_t icu_data_all_len; + + int32_t count; + CA_uchar * icu_data; + CA_uint8 * icu_key; + CA_char * posix_data; + CA_char * posix_key; + CA_win_wchar * win_data; + CA_char * win_key; + + DataIndex * rnd_index; // random by icu key + DataIndex * ord_win_data; + DataIndex * ord_win_key; + DataIndex * ord_posix_data; + DataIndex * ord_posix_key; + DataIndex * ord_icu_data; + DataIndex * ord_icu_key; + DataIndex * ord_win_wcscmp; + DataIndex * ord_icu_strcmp; + DataIndex * ord_icu_cmpcpo; + + virtual ~CollPerfTest(){ + ucol_close(col); + delete [] icu_data_all; + delete icu_data; + delete icu_key; + delete posix_data; + delete posix_key; + delete win_data; + delete win_key; + delete[] rnd_index; + delete[] ord_win_data; + delete[] ord_win_key; + delete[] ord_posix_data; + delete[] ord_posix_key; + delete[] ord_icu_data; + delete[] ord_icu_key; + delete[] ord_win_wcscmp; + delete[] ord_icu_strcmp; + delete[] ord_icu_cmpcpo; + } + + CollPerfTest(int32_t argc, const char* argv[], UErrorCode& status):UPerfTest(argc, argv, status){ + col = NULL; + icu_data_all = NULL; + icu_data = NULL; + icu_key = NULL; + posix_data = NULL; + posix_key = NULL; + win_data =NULL; + win_key = NULL; + + rnd_index = NULL; + ord_win_data= NULL; + ord_win_key= NULL; + ord_posix_data= NULL; + ord_posix_key= NULL; + ord_icu_data= NULL; + ord_icu_key= NULL; + ord_win_wcscmp = NULL; + ord_icu_strcmp = NULL; + ord_icu_cmpcpo = NULL; + + if (U_FAILURE(status)){ + return; + } + + // Parse additional arguments + + UOption options[] = { + UOPTION_DEF("langid", 'i', UOPT_REQUIRES_ARG), // Windows Language ID number. + UOPTION_DEF("rulefile", 'r', UOPT_REQUIRES_ARG), // --rulefile <filename> + // Collation related arguments. All are optional. + // To simplify parsing, two choice arguments are disigned as NO_ARG. + // The default value is UPPER word in the comment + UOPTION_DEF("c_french", 'f', UOPT_NO_ARG), // --french <on | OFF> + UOPTION_DEF("c_alternate", 'a', UOPT_NO_ARG), // --alternate <NON_IGNORE | shifted> + UOPTION_DEF("c_casefirst", 'c', UOPT_REQUIRES_ARG), // --casefirst <lower | upper | OFF> + UOPTION_DEF("c_caselevel", 'l', UOPT_NO_ARG), // --caselevel <on | OFF> + UOPTION_DEF("c_normal", 'n', UOPT_NO_ARG), // --normal <on | OFF> + UOPTION_DEF("c_strength", 's', UOPT_REQUIRES_ARG), // --strength <1-5> + }; + int32_t opt_len = (sizeof(options)/sizeof(options[0])); + enum {i, r,f,a,c,l,n,s}; // The buffer between the option items' order and their references + + _remainingArgc = u_parseArgs(_remainingArgc, (char**)argv, opt_len, options); + + if (_remainingArgc < 0){ + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + + if (locale == NULL){ + locale = "en_US"; // set default locale + } + + //#ifdef U_WINDOWS + if (options[i].doesOccur) { + char *endp; + int tmp = strtol(options[i].value, &endp, 0); + if (endp == options[i].value) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + win_langid = MAKELCID(tmp, SORT_DEFAULT); + } else { + win_langid = uloc_getLCID(locale); + } + //#endif + + // Set up an ICU collator + if (options[r].doesOccur) { + // TODO: implement it + } else { + col = ucol_open(locale, &status); + if (U_FAILURE(status)) { + return; + } + } + + if (options[f].doesOccur) { + ucol_setAttribute(col, UCOL_FRENCH_COLLATION, UCOL_ON, &status); + } else { + ucol_setAttribute(col, UCOL_FRENCH_COLLATION, UCOL_OFF, &status); + } + + if (options[a].doesOccur) { + ucol_setAttribute(col, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status); + } + + if (options[c].doesOccur) { // strcmp() has i18n encoding problem + if (strcmp("lower", options[c].value) == 0){ + ucol_setAttribute(col, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, &status); + } else if (strcmp("upper", options[c].value) == 0) { + ucol_setAttribute(col, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, &status); + } else { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + } + + if (options[l].doesOccur){ + ucol_setAttribute(col, UCOL_CASE_LEVEL, UCOL_ON, &status); + } + + if (options[n].doesOccur){ + ucol_setAttribute(col, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); + } + + if (options[s].doesOccur) { + char *endp; + int tmp = strtol(options[l].value, &endp, 0); + if (endp == options[l].value) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + switch (tmp) { + case 1: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_PRIMARY, &status); break; + case 2: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_SECONDARY, &status); break; + case 3: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_TERTIARY, &status); break; + case 4: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_QUATERNARY, &status); break; + case 5: ucol_setAttribute(col, UCOL_STRENGTH, UCOL_IDENTICAL, &status); break; + default: status = U_ILLEGAL_ARGUMENT_ERROR; return; + } + } + prepareData(status); + } + + //to avoid use the annoying 'id' in TESTCASE(id,test) macro or the like +#define TEST(testname, classname, arg1, arg2, arg3, arg4, arg5, arg6) \ + if(temp == index) {\ + name = #testname;\ + if (exec) {\ + UErrorCode status = U_ZERO_ERROR;\ + UPerfFunction * t = new classname(status,arg1, arg2, arg3, arg4, arg5, arg6);\ + if (U_FAILURE(status)) {\ + delete t;\ + return NULL;\ + } else {\ + return t;\ + }\ + } else {\ + return NULL;\ + }\ + }\ + temp++\ + + + virtual UPerfFunction* runIndexedTest( /*[in]*/int32_t index, /*[in]*/UBool exec, /*[out]*/const char* &name, /*[in]*/ char* par = NULL ){ + int temp = 0; + +#define TEST_KEYGEN(testname, func)\ + TEST(testname, CmdKeyGen, col, win_langid, count, rnd_index, &CmdKeyGen::func, 0) + TEST_KEYGEN(TestIcu_KeyGen_null, icu_key_null); + TEST_KEYGEN(TestIcu_KeyGen_len, icu_key_len); + TEST_KEYGEN(TestPosix_KeyGen_null, posix_key_null); + TEST_KEYGEN(TestWin_KeyGen_null, win_key_null); + TEST_KEYGEN(TestWin_KeyGen_len, win_key_len); + +#define TEST_ITER(testname, func)\ + TEST(testname, CmdIter, col, count, icu_data, &CmdIter::func,0,0) + TEST_ITER(TestIcu_ForwardIter_null, icu_forward_null); + TEST_ITER(TestIcu_ForwardIter_len, icu_forward_len); + TEST_ITER(TestIcu_BackwardIter_null, icu_backward_null); + TEST_ITER(TestIcu_BackwardIter_len, icu_backward_len); + +#define TEST_ITER_ALL(testname, func)\ + TEST(testname, CmdIterAll, col, icu_data_all_len, icu_data_all, CmdIterAll::func,0,0) + TEST_ITER_ALL(TestIcu_ForwardIter_all_null, forward_null); + TEST_ITER_ALL(TestIcu_ForwardIter_all_len, forward_len); + TEST_ITER_ALL(TestIcu_BackwardIter_all_null, backward_null); + TEST_ITER_ALL(TestIcu_BackwardIter_all_len, backward_len); + +#define TEST_QSORT(testname, func)\ + TEST(testname, CmdQsort, rnd_index, count, sizeof(DataIndex), CmdQsort::func,0,0) + TEST_QSORT(TestIcu_qsort_strcoll_null, icu_strcoll_null); + TEST_QSORT(TestIcu_qsort_strcoll_len, icu_strcoll_len); + TEST_QSORT(TestIcu_qsort_usekey, icu_cmpkey); + TEST_QSORT(TestPosix_qsort_strcoll_null, posix_strcoll_null); + TEST_QSORT(TestPosix_qsort_usekey, posix_cmpkey); + TEST_QSORT(TestWin_qsort_CompareStringW_null, win_cmp_null); + TEST_QSORT(TestWin_qsort_CompareStringW_len, win_cmp_len); + TEST_QSORT(TestWin_qsort_usekey, win_cmpkey); + +#define TEST_BIN(testname, func)\ + TEST(testname, CmdBinSearch, col, win_langid, count, rnd_index, ord_icu_key, &CmdBinSearch::func) + TEST_BIN(TestIcu_BinarySearch_strcoll_null, icu_strcoll_null); + TEST_BIN(TestIcu_BinarySearch_strcoll_len, icu_strcoll_len); + TEST_BIN(TestIcu_BinarySearch_usekey, icu_cmpkey); + TEST_BIN(TestIcu_BinarySearch_strcmp, icu_strcmp); + TEST_BIN(TestIcu_BinarySearch_cmpCPO, icu_cmpcpo); + TEST_BIN(TestPosix_BinarySearch_strcoll_null, posix_strcoll_null); + TEST_BIN(TestPosix_BinarySearch_usekey, posix_cmpkey); + TEST_BIN(TestWin_BinarySearch_CompareStringW_null, win_cmp_null); + TEST_BIN(TestWin_BinarySearch_CompareStringW_len, win_cmp_len); + TEST_BIN(TestWin_BinarySearch_usekey, win_cmpkey); + TEST_BIN(TestWin_BinarySearch_wcscmp, win_wcscmp); + + name=""; + return NULL; + } + + + + void prepareData(UErrorCode& status){ + if(U_FAILURE(status)) return; + if (icu_data) return; // prepared + + icu_data = new CA_uchar(); + + // Following code is borrowed from UPerfTest::getLines(); + const UChar* line=NULL; + int32_t len =0; + for (;;) { + line = ucbuf_readline(ucharBuf,&len,&status); + if(line == NULL || U_FAILURE(status)){break;} + + // Refer to the source code of ucbuf_readline() + // 1. 'len' includs the line terminal symbols + // 2. The length of the line terminal symbols is only one character + // 3. The Windows CR LF line terminal symbols will be converted to CR + + if (len == 1) { + continue; //skip empty line + } else { + icu_data->append_one(len); + memcpy(icu_data->last(), line, len * sizeof(UChar)); + icu_data->last()[len -1] = NULL; + } + } + if(U_FAILURE(status)) return; + + // UTF-16 -> UTF-8 conversion. + UConverter *conv = ucnv_open("utf-8", &status); // just UTF-8 for now. + if (U_FAILURE(status)) return; + + count = icu_data->count; + + icu_data_all_len = icu_data->index[count]; // includes all NULLs + icu_data_all_len -= count; // excludes all NULLs + icu_data_all_len += 1; // the terminal NULL + icu_data_all = new UChar[icu_data_all_len]; + icu_data_all[icu_data_all_len - 1] = 0; //the terminal NULL + + icu_key = new CA_uint8; + win_data = new CA_win_wchar; + win_key = new CA_char; + posix_data = new CA_char; + posix_key = new CA_char; + rnd_index = new DataIndex[count]; + DataIndex::win_langid = win_langid; + DataIndex::col = col; + + + UChar * p = icu_data_all; + int32_t s; + int32_t t; + for (int i=0; i < count; i++) { + // ICU all data + s = sizeof(UChar) * icu_data->lengthOf(i); + memcpy(p, icu_data->dataOf(i), s); + p += icu_data->lengthOf(i); + + // ICU data + + // ICU key + s = ucol_getSortKey(col, icu_data->dataOf(i), -1,NULL, 0); + icu_key->append_one(s); + t = ucol_getSortKey(col, icu_data->dataOf(i), -1,icu_key->last(), s); + if (t != s) {status = U_INVALID_FORMAT_ERROR;return;} + + // POSIX data + s = ucnv_fromUChars(conv,NULL, 0, icu_data->dataOf(i), icu_data->lengthOf(i), &status); + if (status == U_BUFFER_OVERFLOW_ERROR || status == U_ZERO_ERROR){ + status = U_ZERO_ERROR; + } else { + return; + } + posix_data->append_one(s + 1); // plus terminal NULL + t = ucnv_fromUChars(conv,posix_data->last(), s, icu_data->dataOf(i), icu_data->lengthOf(i), &status); + if (U_FAILURE(status)) return; + if ( t != s){status = U_INVALID_FORMAT_ERROR;return;} + posix_data->last()[s] = 0; + + // POSIX key + s = strxfrm(NULL, posix_data->dataOf(i), 0); + if (s == INT_MAX){status = U_INVALID_FORMAT_ERROR;return;} + posix_key->append_one(s); + t = strxfrm(posix_key->last(), posix_data->dataOf(i), s); + if (t != s) {status = U_INVALID_FORMAT_ERROR;return;} + + // Win data + s = icu_data->lengthOf(i) + 1; // plus terminal NULL + win_data->append_one(s); + memcpy(win_data->last(), icu_data->dataOf(i), sizeof(WCHAR) * s); + + // Win key + s = LCMapStringW(win_langid, LCMAP_SORTKEY, win_data->dataOf(i), win_data->lengthOf(i), NULL,0); + if (s == 0) {status = U_INVALID_FORMAT_ERROR;return;} + win_key->append_one(s); + t = LCMapStringW(win_langid, LCMAP_SORTKEY, win_data->dataOf(i), win_data->lengthOf(i), (WCHAR *)(win_key->last()),s); + if (t != s) {status = U_INVALID_FORMAT_ERROR;return;} + + }; + + // append_one() will make points shifting, should not merge following code into previous iteration + for (int i=0; i < count; i++) { + rnd_index[i].icu_key = icu_key->dataOf(i); + rnd_index[i].icu_data = icu_data->dataOf(i); + rnd_index[i].icu_data_len = icu_data->lengthOf(i); + rnd_index[i].posix_key = posix_key->last(); + rnd_index[i].posix_data = posix_data->dataOf(i); + rnd_index[i].posix_data_len = posix_data->lengthOf(i); + rnd_index[i].win_key = win_key->dataOf(i); + rnd_index[i].win_data = win_data->dataOf(i); + rnd_index[i].win_data_len = win_data->lengthOf(i); + }; + + ucnv_close(conv); + qsort(rnd_index, count, sizeof(DataIndex), CmdQsort::q_random); + +#define SORT(data, func) \ + data = new DataIndex[count];\ + memcpy(data, rnd_index, count * sizeof(DataIndex));\ + qsort(data, count, sizeof(DataIndex), CmdQsort::func) + + SORT(ord_icu_data, icu_strcoll_len); + SORT(ord_icu_key, icu_cmpkey); + SORT(ord_posix_data, posix_strcoll_null); + SORT(ord_posix_key, posix_cmpkey); + SORT(ord_win_data, win_cmp_len); + SORT(ord_win_key, win_cmpkey); + SORT(ord_win_wcscmp, win_wcscmp); + SORT(ord_icu_strcmp, icu_strcmp); + SORT(ord_icu_cmpcpo, icu_cmpcpo); + } +}; + + +int main(int argc, const char *argv[]) +{ + + UErrorCode status = U_ZERO_ERROR; + CollPerfTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + //TODO: print usage here + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + return 0; +} + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj new file mode 100644 index 00000000000..f34d8bd48a7 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/collperf/collperf.vcproj @@ -0,0 +1,246 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="collperf" + ProjectGUID="{01807B4A-E3B5-4B97-A7F3-207746DCD71E}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/collperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/collperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icuind.lib icutud.lib winmm.lib icutestd.lib" + OutputFile=".\Debug/collperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/collperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/collperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/collperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icuin.lib icutest.lib icutu.lib winmm.lib" + OutputFile=".\Release/collperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/collperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="collperf.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl new file mode 100644 index 00000000000..1b3e7c1a025 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/ConvPerf_r.pl @@ -0,0 +1,61 @@ +#!/usr/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2007, International Business Machines +# * Corporation and others. All Rights Reserved. +# ******************************************************************** + +use strict; + +#Assume we are running outside of the icu source +use lib './icu-3.0/icu/source/test/perf/perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Conversion performance regression (ICU 2.8 and 3.0)", + "headers"=>"ICU28 ICU30", + "operationIs"=>"code point", + "timePerOperationIs"=>"Time per code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"results_ICU4C" + }; + +# programs + +my $p1 = "icu-2.8/icu/bin/convperf28.exe"; +my $p2 = "icu-3.0/icu/bin/convperf30.exe"; + +my $dataFiles = ""; + + +my $tests = { + "UTF-8 From Unicode", ["$p1 TestICU_UTF8_FromUnicode" , "$p2 TestICU_UTF8_FromUnicode" ], + "UTF-8 To Unicode", ["$p1 TestICU_UTF8_ToUnicode" , "$p2 TestICU_UTF8_ToUnicode" ], + #### + "ISO-8859-1 From Unicode", ["$p1 TestICU_Latin1_FromUnicode" , "$p2 TestICU_Latin1_FromUnicode" ], + "ISO-8859-1 To Unicode", ["$p1 TestICU_Latin1_ToUnicode" , "$p2 TestICU_Latin1_ToUnicode" ], + #### + "Shift-JIS From Unicode", ["$p1 TestICU_SJIS_FromUnicode" , "$p2 TestICU_SJIS_FromUnicode" ], + "Shift-JIS To Unicode", ["$p1 TestICU_SJIS_ToUnicode" , "$p2 TestICU_SJIS_ToUnicode" ], + #### + "EUC-JP From Unicode", ["$p1 TestICU_EUCJP_FromUnicode" , "$p2 TestICU_EUCJP_FromUnicode" ], + "EUC-JP To Unicode", ["$p1 TestICU_EUCJP_ToUnicode" , "$p2 TestICU_EUCJP_ToUnicode" ], + #### + "GB2312 From Unicode", ["$p1 TestICU_GB2312_FromUnicode" , "$p2 TestICU_GB2312_FromUnicode" ], + "GB2312 To Unicode", ["$p1 TestICU_GB2312_ToUnicode" , "$p2 TestICU_GB2312_ToUnicode" ], + #### + "ISO2022KR From Unicode", ["$p1 TestICU_ISO2022KR_FromUnicode", "$p2 TestICU_ISO2022KR_FromUnicode" ], + "ISO2022KR To Unicode", ["$p1 TestICU_ISO2022KR_ToUnicode" , "$p2 TestICU_ISO2022KR_ToUnicode" ], + #### + "ISO2022JP From Unicode", ["$p1 TestICU_ISO2022JP_FromUnicode", "$p2 TestICU_ISO2022JP_FromUnicode" ], + "ISO2022JP To Unicode", ["$p1 TestICU_ISO2022JP_ToUnicode" , "$p2 TestICU_ISO2022JP_ToUnicode" ], + }; + + +runTests($options, $tests, $dataFiles); + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in new file mode 100644 index 00000000000..b2ec30bc698 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/collperf +## Copyright (c) 2001-2007, 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 + +## Build directory information +subdir = test/perf/convperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = collperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = convperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp new file mode 100644 index 00000000000..dabbef7f6ef --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.cpp @@ -0,0 +1,654 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +/** + * This Program tests the performance of ICU's Normalization engine against Windows + * to run it use the command like + * + * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 -p 15 -f TestNames_Asian.txt -u -e UTF-8 -l + */ +#include "convperf.h" +#include "data.h" +#include <stdio.h> + +int main(int argc, const char* argv[]){ + UErrorCode status = U_ZERO_ERROR; + ConverterPerformanceTest test(argc, argv, status); + if(U_FAILURE(status)){ + return status; + } + if(test.run()==FALSE){ + fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n"); + return -1; + } + return 0; +} + + +ConverterPerformanceTest::ConverterPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status) +: UPerfTest(argc,argv,status){ + +} + +ConverterPerformanceTest::~ConverterPerformanceTest(){ + +} + +UPerfFunction* ConverterPerformanceTest::runIndexedTest(int32_t index, UBool exec,const char* &name, char* par) { + switch (index) { + TESTCASE(0,TestICU_CleanOpenAllConverters);// This calls u_cleanup() + TESTCASE(1,TestICU_OpenAllConverters);// This doesn't call u_cleanup() + + TESTCASE(2,TestICU_UTF8_ToUnicode); + TESTCASE(3,TestICU_UTF8_FromUnicode); + TESTCASE(4,TestWinANSI_UTF8_ToUnicode); + TESTCASE(5,TestWinANSI_UTF8_FromUnicode); + TESTCASE(6,TestWinIML2_UTF8_ToUnicode); + TESTCASE(7,TestWinIML2_UTF8_FromUnicode); + + TESTCASE(8,TestICU_Latin1_ToUnicode); + TESTCASE(9,TestICU_Latin1_FromUnicode); + TESTCASE(10,TestWinIML2_Latin1_ToUnicode); + TESTCASE(11,TestWinIML2_Latin1_FromUnicode); + + TESTCASE(12,TestICU_Latin8_ToUnicode); + TESTCASE(13,TestICU_Latin8_FromUnicode); + TESTCASE(14,TestWinIML2_Latin8_ToUnicode); + TESTCASE(15,TestWinIML2_Latin8_FromUnicode); + + TESTCASE(16,TestICU_EBCDIC_Arabic_ToUnicode); + TESTCASE(17,TestICU_EBCDIC_Arabic_FromUnicode); + TESTCASE(18,TestWinIML2_EBCDIC_Arabic_ToUnicode); + TESTCASE(19,TestWinIML2_EBCDIC_Arabic_FromUnicode); + + TESTCASE(20,TestICU_SJIS_ToUnicode); + TESTCASE(21,TestICU_SJIS_FromUnicode); + TESTCASE(22,TestWinIML2_SJIS_ToUnicode); + TESTCASE(23,TestWinIML2_SJIS_FromUnicode); + + TESTCASE(24,TestICU_EUCJP_ToUnicode); + TESTCASE(25,TestICU_EUCJP_FromUnicode); + TESTCASE(26,TestWinIML2_EUCJP_ToUnicode); + TESTCASE(27,TestWinIML2_EUCJP_FromUnicode); + + TESTCASE(28,TestICU_GB2312_FromUnicode); + TESTCASE(29,TestICU_GB2312_ToUnicode); + TESTCASE(30,TestWinIML2_GB2312_ToUnicode); + TESTCASE(31,TestWinIML2_GB2312_FromUnicode); + + TESTCASE(32,TestICU_ISO2022KR_ToUnicode); + TESTCASE(33,TestICU_ISO2022KR_FromUnicode); + TESTCASE(34,TestWinIML2_ISO2022KR_ToUnicode); + TESTCASE(35,TestWinIML2_ISO2022KR_FromUnicode); + + TESTCASE(36,TestICU_ISO2022JP_ToUnicode); + TESTCASE(37,TestICU_ISO2022JP_FromUnicode); + TESTCASE(38,TestWinIML2_ISO2022JP_ToUnicode); + TESTCASE(39,TestWinIML2_ISO2022JP_FromUnicode); + + TESTCASE(40,TestWinANSI_Latin1_ToUnicode); + TESTCASE(41,TestWinANSI_Latin1_FromUnicode); + + TESTCASE(42,TestWinANSI_Latin8_ToUnicode); + TESTCASE(43,TestWinANSI_Latin8_FromUnicode); + + TESTCASE(44,TestWinANSI_SJIS_ToUnicode); + TESTCASE(45,TestWinANSI_SJIS_FromUnicode); + + TESTCASE(46,TestWinANSI_EUCJP_ToUnicode); + TESTCASE(47,TestWinANSI_EUCJP_FromUnicode); + + TESTCASE(48,TestWinANSI_GB2312_ToUnicode); + TESTCASE(49,TestWinANSI_GB2312_FromUnicode); + + TESTCASE(50,TestWinANSI_ISO2022KR_ToUnicode); + TESTCASE(51,TestWinANSI_ISO2022KR_FromUnicode); + + TESTCASE(52,TestWinANSI_ISO2022JP_ToUnicode); + TESTCASE(53,TestWinANSI_ISO2022JP_FromUnicode); + + default: + name = ""; + return NULL; + } + return NULL; + +} + +UPerfFunction* ConverterPerformanceTest::TestICU_CleanOpenAllConverters() { + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUOpenAllConvertersFunction(TRUE, status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_OpenAllConverters() { + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUOpenAllConvertersFunction(FALSE, status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_UTF8_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_UTF8_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("utf-8",utf8_uniSource, LENGTHOF(utf8_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_UTF8_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("utf-8",(char*)utf8_encSource, LENGTHOF(utf8_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +//################ + +UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_Latin1_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin1_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-1",latin1_uniSource, LENGTHOF(latin1_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin1_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-1",(char*)latin1_encSource, LENGTHOF(latin1_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +//################## + +UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_Latin8_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_Latin8_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} +UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-8859-8",latin8_uniSource, LENGTHOF(latin8_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_Latin8_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-8859-8",(char*)latin8_encSource, LENGTHOF(latin8_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +//################# + + +UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_EBCDIC_Arabic_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_EBCDIC_Arabic_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("x-EBCDIC-Arabic",ebcdic_arabic_uniSource, LENGTHOF(ebcdic_arabic_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_EBCDIC_Arabic_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("x-EBCDIC-Arabic",(char*)ebcdic_arabic_encSource, LENGTHOF(ebcdic_arabic_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} +//################# + + +UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_SJIS_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_SJIS_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("sjis",sjis_uniSource, LENGTHOF(sjis_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_SJIS_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("sjis",(char*)sjis_encSource, LENGTHOF(sjis_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +//################# + + +UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_EUCJP_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_EUCJP_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("euc-jp",eucjp_uniSource, LENGTHOF(eucjp_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_EUCJP_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("euc-jp",(char*)eucjp_encSource, LENGTHOF(eucjp_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +//################# + + +UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_GB2312_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_GB2312_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("gb2312",gb2312_uniSource, LENGTHOF(gb2312_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_GB2312_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("gb2312",(char*)gb2312_encSource, LENGTHOF(gb2312_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +//################# + + +UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022KR_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022KR_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-kr",iso2022kr_uniSource, LENGTHOF(iso2022kr_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022KR_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-kr",(char*)iso2022kr_encSource, LENGTHOF(iso2022kr_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} +//################# + + +UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + ICUFromUnicodePerfFunction* pf = new ICUFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestICU_ISO2022JP_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new ICUToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2FromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinIML2_ISO2022JP_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinIMultiLanguage2ToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_FromUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIFromUnicodePerfFunction("iso-2022-jp",iso2022jp_uniSource, LENGTHOF(iso2022jp_uniSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +} + +UPerfFunction* ConverterPerformanceTest::TestWinANSI_ISO2022JP_ToUnicode(){ + UErrorCode status = U_ZERO_ERROR; + UPerfFunction* pf = new WinANSIToUnicodePerfFunction("iso-2022-jp",(char*)iso2022jp_encSource, LENGTHOF(iso2022jp_encSource), status); + if(U_FAILURE(status)){ + return NULL; + } + return pf; +}
\ No newline at end of file diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h new file mode 100644 index 00000000000..994553aa52d --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.h @@ -0,0 +1,568 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +#ifndef _CONVPERF_H +#define _CONVPERF_H + +#include <mlang.h> +#include <objbase.h> +#include <stdlib.h> +#include "unicode/ucnv.h" +#include "unicode/uclean.h" +#include "unicode/ustring.h" + +#include "unicode/uperf.h" + +#define CONVERSION_FLAGS (0) /*WC_DEFAULTCHAR WC_COMPOSITECHECK & WC_SEPCHARS*/ +#define MAX_BUF_SIZE 3048 +#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) + +class ICUToUnicodePerfFunction : public UPerfFunction{ +private: + UConverter* conv; + const char* src; + int32_t srcLen; + UChar* target; + UChar* targetLimit; + +public: + ICUToUnicodePerfFunction(const char* name, const char* source, int32_t sourceLen, UErrorCode& status){ + conv = ucnv_open(name,&status); + src = source; + srcLen = sourceLen; + if(U_FAILURE(status)){ + conv = NULL; + return; + } + target = NULL; + targetLimit = NULL; + int32_t reqdLen = ucnv_toUChars(conv, target, 0, + source, srcLen, &status); + if(status==U_BUFFER_OVERFLOW_ERROR) { + status=U_ZERO_ERROR; + target=(UChar*)malloc((reqdLen) * U_SIZEOF_UCHAR*2); + targetLimit = target + reqdLen; + if(target == NULL){ + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + } + } + virtual void call(UErrorCode* status){ + const char* mySrc = src; + const char* sourceLimit = src + srcLen; + UChar* myTarget = target; + ucnv_toUnicode(conv, &myTarget, targetLimit, &mySrc, sourceLimit, NULL, TRUE, status); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } + ~ICUToUnicodePerfFunction(){ + free(target); + ucnv_close(conv); + } +}; +class ICUFromUnicodePerfFunction : public UPerfFunction{ +private: + UConverter* conv; + const UChar* src; + int32_t srcLen; + char* target; + char* targetLimit; + const char* name; + +public: + ICUFromUnicodePerfFunction(const char* name, const UChar* source, int32_t sourceLen, UErrorCode& status){ + conv = ucnv_open(name,&status); + src = source; + srcLen = sourceLen; + if(U_FAILURE(status)){ + conv = NULL; + return; + } + target = NULL; + targetLimit = NULL; + int32_t reqdLen = ucnv_fromUChars(conv, target, 0, + source, srcLen, &status); + if(status==U_BUFFER_OVERFLOW_ERROR) { + status=U_ZERO_ERROR; + target=(char*)malloc((reqdLen*2)); + targetLimit = target + reqdLen; + if(target == NULL){ + status = U_MEMORY_ALLOCATION_ERROR; + return; + } + } + } + virtual void call(UErrorCode* status){ + const UChar* mySrc = src; + const UChar* sourceLimit = src + srcLen; + char* myTarget = target; + ucnv_fromUnicode(conv,&myTarget, targetLimit, &mySrc, sourceLimit, NULL, TRUE, status); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } + ~ICUFromUnicodePerfFunction(){ + free(target); + ucnv_close(conv); + } +}; + +class ICUOpenAllConvertersFunction : public UPerfFunction{ +private: + UBool cleanup; + int32_t availableConverters; + const char **convNames; +public: + ICUOpenAllConvertersFunction(UBool callCleanup, UErrorCode& status){ + int32_t idx; + cleanup = callCleanup; + availableConverters = ucnv_countAvailable(); + convNames = new const char *[availableConverters]; + for (idx = 0; idx < availableConverters; idx++) { + convNames[idx] = ucnv_getAvailableName(idx); + } + } + virtual void call(UErrorCode* status){ + int32_t idx; + if (cleanup) { + u_cleanup(); + } + for (idx = 0; idx < availableConverters; idx++) { + ucnv_close(ucnv_open(convNames[idx], status)); + } + } + virtual long getOperationsPerIteration(void){ + return availableConverters; + } + ~ICUOpenAllConvertersFunction(){ + delete []convNames; + } +}; + +class WinANSIToUnicodePerfFunction : public UPerfFunction{ + +private: + DWORD uiCodePage; + char* src; + UINT srcLen; + WCHAR dest[MAX_BUF_SIZE]; + UINT dstLen; + const char* name; +public: + WinANSIToUnicodePerfFunction(const char* cpName, char* pszIn,UINT szLen, UErrorCode& status){ + name = cpName; + src = pszIn; + srcLen = szLen; + dstLen = LENGTHOF(dest); + unsigned short bEnc[30]={'\0'}; + const char* tenc=name; + for(int i=0;*tenc!='\0';i++){ + bEnc[i]=*tenc; + tenc++; + } + LPMULTILANGUAGE2 pMulti; + + CoInitialize(NULL); + + /* create instance of converter object*/ + CoCreateInstance( + __uuidof(CMultiLanguage), + NULL, + CLSCTX_SERVER, + __uuidof(IMultiLanguage2), + (void**)&pMulti + ); + + + + MIMECSETINFO mimeInfo; + + mimeInfo.uiCodePage = 0; + mimeInfo.uiInternetEncoding =0; + /* get the charset info */ + pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo); + uiCodePage = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding; + } + virtual void call(UErrorCode* status){ + int winSize =MultiByteToWideChar(uiCodePage,CONVERSION_FLAGS,src,srcLen,dest,dstLen); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } +}; + +class WinANSIFromUnicodePerfFunction : public UPerfFunction{ + +private: + DWORD uiCodePage; + WCHAR* src; + UINT srcLen; + char dest[MAX_BUF_SIZE]; + UINT dstLen; + const char* name; + BOOL lpUsedDefaultChar; + +public: + WinANSIFromUnicodePerfFunction(const char* cpName, WCHAR* pszIn,UINT szLen, UErrorCode& status){ + name = cpName; + src = pszIn; + srcLen = szLen; + dstLen = LENGTHOF(dest); + lpUsedDefaultChar=FALSE; + unsigned short bEnc[30]={'\0'}; + const char* tenc=name; + for(int i=0;*tenc!='\0';i++){ + bEnc[i]=*tenc; + tenc++; + } + LPMULTILANGUAGE2 pMulti; + + CoInitialize(NULL); + + /* create instance of converter object*/ + CoCreateInstance( + __uuidof(CMultiLanguage), + NULL, + CLSCTX_SERVER, + __uuidof(IMultiLanguage2), + (void**)&pMulti + ); + + + + MIMECSETINFO mimeInfo; + mimeInfo.uiCodePage = 0; + mimeInfo.uiInternetEncoding =0; + /* get the charset info */ + pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo); + uiCodePage = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding; + } + virtual void call(UErrorCode* status){ + BOOL* pUsedDefaultChar =(uiCodePage==CP_UTF8)?NULL:&lpUsedDefaultChar; + int winSize = WideCharToMultiByte(uiCodePage,CONVERSION_FLAGS,src,srcLen,dest,dstLen,NULL, pUsedDefaultChar); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } +}; +static inline void getErr(HRESULT err, UErrorCode& status){ + + switch (err){ + + case S_OK: + //printf("Operation %s successful\n",operation); + break; + case S_FALSE: + status = U_INTERNAL_PROGRAM_ERROR; + break; + case E_FAIL: + status = U_ILLEGAL_CHAR_FOUND; + } +} +class WinIMultiLanguageToUnicodePerfFunction : public UPerfFunction{ + +private: + LPMULTILANGUAGE2 pMulti; + LPMLANGCONVERTCHARSET pConvToUni; + char* src; + UINT srcLen; + WCHAR dst[MAX_BUF_SIZE]; + UINT dstLen; + const char* cpName; + +public: + WinIMultiLanguageToUnicodePerfFunction(const char* name,char* source, UINT sourceLen, UErrorCode& status){ + + CoInitialize(NULL); + + /* create instance of converter object*/ + CoCreateInstance( + __uuidof(CMultiLanguage), + NULL, + CLSCTX_SERVER, + __uuidof(IMultiLanguage2), + (void**)&pMulti + ); + + + + MIMECSETINFO mimeInfo; + mimeInfo.uiCodePage = 0; + mimeInfo.uiInternetEncoding =0; + HRESULT err=S_OK; + unsigned short bEnc[30]={'\0'}; + const char* tenc=name; + for(int i=0;*tenc!='\0';i++){ + bEnc[i]=*tenc; + tenc++; + } + /* get the charset info */ + pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo); + pMulti->CreateConvertCharset(mimeInfo.uiCodePage, 1200 /*unicode*/, (DWORD)0,&pConvToUni); + getErr(err,status); + src = source; + srcLen = sourceLen; + dstLen = LENGTHOF(dst); + cpName = name; + } + + virtual void call(UErrorCode* status){ + HRESULT err= pConvToUni->DoConversionToUnicode(src,&srcLen,dst, &dstLen); + getErr(err,*status); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } +}; + +class WinIMultiLanguageFromUnicodePerfFunction : public UPerfFunction{ + +private: + LPMULTILANGUAGE2 pMulti; + LPMLANGCONVERTCHARSET pConvFromUni; + WCHAR* src; + UINT srcLen; + char dst[MAX_BUF_SIZE]; + UINT dstLen; + const char* cpName; + +public: + WinIMultiLanguageFromUnicodePerfFunction(const char* name,WCHAR* source, UINT sourceLen, UErrorCode& status){ + + CoInitialize(NULL); + + /* create instance of converter object*/ + CoCreateInstance( + __uuidof(CMultiLanguage), + NULL, + CLSCTX_SERVER, + __uuidof(IMultiLanguage2), + (void**)&pMulti + ); + + + + MIMECSETINFO mimeInfo; + mimeInfo.uiCodePage = 0; + mimeInfo.uiInternetEncoding =0; + HRESULT err=S_OK; + unsigned short bEnc[30]={'\0'}; + const char* tenc=name; + for(int i=0;*tenc!='\0';i++){ + bEnc[i]=*tenc; + tenc++; + } + /* get the charset info */ + pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo); + pMulti->CreateConvertCharset(1200 /*unicode*/, mimeInfo.uiCodePage, (DWORD)0,&pConvFromUni); + getErr(err,status); + src = source; + srcLen = sourceLen; + dstLen = LENGTHOF(dst); + cpName = name; + + } + + virtual void call(UErrorCode* status){ + HRESULT err= pConvFromUni->DoConversionFromUnicode(src,&srcLen,dst, &dstLen); + getErr(err,*status); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } +}; + +class WinIMultiLanguage2ToUnicodePerfFunction : public UPerfFunction{ + +private: + LPMULTILANGUAGE2 pMulti; + char* src; + UINT srcLen; + WCHAR dst[MAX_BUF_SIZE]; + UINT dstLen; + const char* cpName; + DWORD dwEnc; +public: + WinIMultiLanguage2ToUnicodePerfFunction(const char* name,char* source, UINT sourceLen, UErrorCode& status){ + + CoInitialize(NULL); + + /* create instance of converter object*/ + CoCreateInstance( + __uuidof(CMultiLanguage), + NULL, + CLSCTX_SERVER, + __uuidof(IMultiLanguage2), + (void**)&pMulti + ); + + src = source; + srcLen = sourceLen; + dstLen = LENGTHOF(dst); + cpName = name; + unsigned short bEnc[30]={'\0'}; + const char* tenc=name; + for(int i=0;*tenc!='\0';i++){ + bEnc[i]=*tenc; + tenc++; + } + /* get the charset info */ + MIMECSETINFO mimeInfo; + mimeInfo.uiCodePage = 0; + mimeInfo.uiInternetEncoding =0; + pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo); + dwEnc = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding; + } + + virtual void call(UErrorCode* status){ + DWORD dwMode=0; + HRESULT err= pMulti->ConvertStringToUnicode(&dwMode,dwEnc,(char*)src,&srcLen,dst, &dstLen); + getErr(err,*status); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } +}; + +class WinIMultiLanguage2FromUnicodePerfFunction : public UPerfFunction{ + +private: + LPMULTILANGUAGE2 pMulti; + LPMLANGCONVERTCHARSET pConvFromUni; + WCHAR* src; + UINT srcLen; + char dst[MAX_BUF_SIZE]; + UINT dstLen; + const char* cpName; + DWORD dwEnc; + +public: + WinIMultiLanguage2FromUnicodePerfFunction(const char* name,WCHAR* source, UINT sourceLen, UErrorCode& status){ + + CoInitialize(NULL); + + /* create instance of converter object*/ + CoCreateInstance( + __uuidof(CMultiLanguage), + NULL, + CLSCTX_SERVER, + __uuidof(IMultiLanguage2), + (void**)&pMulti + ); + + + unsigned short bEnc[30]={'\0'}; + const char* tenc=name; + for(int i=0;*tenc!='\0';i++){ + bEnc[i]=*tenc; + tenc++; + } + src = source; + srcLen = sourceLen; + dstLen = LENGTHOF(dst); + cpName = name; + /* get the charset info */ + MIMECSETINFO mimeInfo; + mimeInfo.uiCodePage = 0; + mimeInfo.uiInternetEncoding =0; + + pMulti->GetCharsetInfo((wchar_t *)bEnc,&mimeInfo); + dwEnc = (mimeInfo.uiInternetEncoding==0)?mimeInfo.uiCodePage:mimeInfo.uiInternetEncoding; + } + + virtual void call(UErrorCode* status){ + DWORD dwMode=0; + HRESULT err= pMulti->ConvertStringFromUnicode(&dwMode,dwEnc,src,&srcLen,dst, &dstLen); + getErr(err,*status); + } + virtual long getOperationsPerIteration(void){ + return srcLen; + } +}; + +class ConverterPerformanceTest : public UPerfTest{ + +public: + + ConverterPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status); + ~ConverterPerformanceTest(); + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,const char* &name, char* par = NULL); + + UPerfFunction* TestICU_CleanOpenAllConverters(); + UPerfFunction* TestICU_OpenAllConverters(); + + UPerfFunction* TestICU_UTF8_ToUnicode(); + UPerfFunction* TestICU_UTF8_FromUnicode(); + UPerfFunction* TestWinANSI_UTF8_ToUnicode(); + UPerfFunction* TestWinANSI_UTF8_FromUnicode(); + UPerfFunction* TestWinIML2_UTF8_ToUnicode(); + UPerfFunction* TestWinIML2_UTF8_FromUnicode(); + + UPerfFunction* TestICU_Latin1_ToUnicode(); + UPerfFunction* TestICU_Latin1_FromUnicode(); + UPerfFunction* TestWinANSI_Latin1_ToUnicode(); + UPerfFunction* TestWinANSI_Latin1_FromUnicode(); + UPerfFunction* TestWinIML2_Latin1_ToUnicode(); + UPerfFunction* TestWinIML2_Latin1_FromUnicode(); + + UPerfFunction* TestICU_EBCDIC_Arabic_ToUnicode(); + UPerfFunction* TestICU_EBCDIC_Arabic_FromUnicode(); + UPerfFunction* TestWinANSI_EBCDIC_Arabic_ToUnicode(); + UPerfFunction* TestWinANSI_EBCDIC_Arabic_FromUnicode(); + UPerfFunction* TestWinIML2_EBCDIC_Arabic_ToUnicode(); + UPerfFunction* TestWinIML2_EBCDIC_Arabic_FromUnicode(); + + UPerfFunction* TestICU_Latin8_ToUnicode(); + UPerfFunction* TestICU_Latin8_FromUnicode(); + UPerfFunction* TestWinANSI_Latin8_ToUnicode(); + UPerfFunction* TestWinANSI_Latin8_FromUnicode(); + UPerfFunction* TestWinIML2_Latin8_ToUnicode(); + UPerfFunction* TestWinIML2_Latin8_FromUnicode(); + + + UPerfFunction* TestICU_SJIS_ToUnicode(); + UPerfFunction* TestICU_SJIS_FromUnicode(); + UPerfFunction* TestWinANSI_SJIS_ToUnicode(); + UPerfFunction* TestWinANSI_SJIS_FromUnicode(); + UPerfFunction* TestWinIML2_SJIS_ToUnicode(); + UPerfFunction* TestWinIML2_SJIS_FromUnicode(); + + UPerfFunction* TestICU_EUCJP_ToUnicode(); + UPerfFunction* TestICU_EUCJP_FromUnicode(); + UPerfFunction* TestWinANSI_EUCJP_ToUnicode(); + UPerfFunction* TestWinANSI_EUCJP_FromUnicode(); + UPerfFunction* TestWinIML2_EUCJP_ToUnicode(); + UPerfFunction* TestWinIML2_EUCJP_FromUnicode(); + + UPerfFunction* TestICU_GB2312_ToUnicode(); + UPerfFunction* TestICU_GB2312_FromUnicode(); + UPerfFunction* TestWinANSI_GB2312_ToUnicode(); + UPerfFunction* TestWinANSI_GB2312_FromUnicode(); + UPerfFunction* TestWinIML2_GB2312_ToUnicode(); + UPerfFunction* TestWinIML2_GB2312_FromUnicode(); + + + UPerfFunction* TestICU_ISO2022KR_ToUnicode(); + UPerfFunction* TestICU_ISO2022KR_FromUnicode(); + UPerfFunction* TestWinANSI_ISO2022KR_ToUnicode(); + UPerfFunction* TestWinANSI_ISO2022KR_FromUnicode(); + UPerfFunction* TestWinIML2_ISO2022KR_ToUnicode(); + UPerfFunction* TestWinIML2_ISO2022KR_FromUnicode(); + + UPerfFunction* TestICU_ISO2022JP_ToUnicode(); + UPerfFunction* TestICU_ISO2022JP_FromUnicode(); + UPerfFunction* TestWinANSI_ISO2022JP_ToUnicode(); + UPerfFunction* TestWinANSI_ISO2022JP_FromUnicode(); + UPerfFunction* TestWinIML2_ISO2022JP_ToUnicode(); + UPerfFunction* TestWinIML2_ISO2022JP_FromUnicode(); + +}; + +#endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj new file mode 100644 index 00000000000..8649cb78a46 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf.vcproj @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="convperf" + ProjectGUID="{B4C03939-D417-41F0-85B4-848ECF105E3A}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/convperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Release/convperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib" + OutputFile=".\Release/convperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/convperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/convperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Debug/convperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib" + OutputFile=".\Debug/convperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/convperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="convperf.cpp" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="convperf.h" + > + </File> + <File + RelativePath="data.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl new file mode 100755 index 00000000000..691a21f63fa --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_ansi.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2003, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Conversion Performance: ICU 2.6 vs. Windows2000 ANSI Interface", + "headers"=>"Windows2000(IMultiLanguage2) ICU", + "operationIs"=>"code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "release/convperf.exe"; + +my $tests = { + "UTF-8 From Unicode", ["$p TestWinANSI_UTF8_FromUnicode" , "$p TestICU_UTF8_FromUnicode" ], + "UTF-8 To Unicode", ["$p TestWinANSI_UTF8_ToUnicode" , "$p TestICU_UTF8_ToUnicode" ], + #### + "ISO-8859-1 From Unicode", ["$p TestWinANSI_Latin1_FromUnicode" , "$p TestICU_Latin1_FromUnicode" ], + "ISO-8859-1 To Unicode", ["$p TestWinANSI_Latin1_ToUnicode" , "$p TestICU_Latin1_ToUnicode" ], + #### + "Shift-JIS From Unicode", ["$p TestWinANSI_SJIS_FromUnicode" , "$p TestICU_SJIS_FromUnicode" ], + "Shift-JIS To Unicode", ["$p TestWinANSI_SJIS_ToUnicode" , "$p TestICU_SJIS_ToUnicode" ], + #### + "EUC-JP From Unicode", ["$p TestWinANSI_EUCJP_FromUnicode" , "$p TestICU_EUCJP_FromUnicode" ], + "EUC-JP To Unicode", ["$p TestWinANSI_EUCJP_ToUnicode" , "$p TestICU_EUCJP_ToUnicode" ], + #### + "GB2312 From Unicode", ["$p TestWinANSI_GB2312_FromUnicode" , "$p TestICU_GB2312_FromUnicode" ], + "GB2312 To Unicode", ["$p TestWinANSI_GB2312_ToUnicode" , "$p TestICU_GB2312_ToUnicode" ], + }; + +my $dataFiles = ""; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl new file mode 100755 index 00000000000..194a1cce549 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/convperf_iml.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2003, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Conversion Performance: ICU 2.6 vs. Windows2000 IMultiLanguage Interface", + "headers"=>"Windows2000(IMultiLanguage2) ICU", + "operationIs"=>"code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "release/convperf.exe"; + +my $tests = { + "UTF-8 From Unicode", ["$p TestWinIML2_UTF8_FromUnicode" , "$p TestICU_UTF8_FromUnicode" ], + "UTF-8 To Unicode", ["$p TestWinIML2_UTF8_ToUnicode" , "$p TestICU_UTF8_ToUnicode" ], + #### + "ISO-8859-1 From Unicode", ["$p TestWinIML2_Latin1_FromUnicode" , "$p TestICU_Latin1_FromUnicode" ], + "ISO-8859-1 To Unicode", ["$p TestWinIML2_Latin1_ToUnicode" , "$p TestICU_Latin1_ToUnicode" ], + #### + "Shift-JIS From Unicode", ["$p TestWinIML2_SJIS_FromUnicode" , "$p TestICU_SJIS_FromUnicode" ], + "Shift-JIS To Unicode", ["$p TestWinIML2_SJIS_ToUnicode" , "$p TestICU_SJIS_ToUnicode" ], + #### + "EUC-JP From Unicode", ["$p TestWinIML2_EUCJP_FromUnicode" , "$p TestICU_EUCJP_FromUnicode" ], + "EUC-JP To Unicode", ["$p TestWinIML2_EUCJP_ToUnicode" , "$p TestICU_EUCJP_ToUnicode" ], + #### + "GB2312 From Unicode", ["$p TestWinIML2_GB2312_FromUnicode" , "$p TestICU_GB2312_FromUnicode" ], + "GB2312 To Unicode", ["$p TestWinIML2_GB2312_ToUnicode" , "$p TestICU_GB2312_ToUnicode" ], + #### + "ISO2022KR From Unicode", ["$p TestWinIML2_ISO2022KR_FromUnicode", "$p TestICU_ISO2022KR_FromUnicode" ], + "ISO2022KR To Unicode", ["$p TestWinIML2_ISO2022KR_ToUnicode" , "$p TestICU_ISO2022KR_ToUnicode" ], + #### + "ISO2022JP From Unicode", ["$p TestWinIML2_ISO2022JP_FromUnicode", "$p TestICU_ISO2022JP_FromUnicode" ], + "ISO2022JP To Unicode", ["$p TestWinIML2_ISO2022JP_ToUnicode" , "$p TestICU_ISO2022JP_ToUnicode" ], + }; + +my $dataFiles = ""; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h b/Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h new file mode 100644 index 00000000000..e80be75c1cc --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/convperf/data.h @@ -0,0 +1,2731 @@ +/* +********************************************************************** +* Copyright (c) 2002-2003,International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +#ifndef _DATA_H +#define _DATA_H + +char iso2022jp_encSource[]={ + 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26, + 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B, + 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28, + 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32, + 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42, + 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B, + 0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x31,0x25,0x33,0x25,0x35,0x25,0x37,0x25,0x39,0x25,0x3B,0x25, + 0x3D,0x25,0x3F,0x1B,0x28,0x42,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24, + 0x42,0x25,0x41,0x25,0x44,0x25,0x46,0x25,0x48,0x25,0x4A,0x25,0x4B,0x25,0x4C,0x25,0x4D,0x1B,0x28,0x42, + 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x4E,0x25,0x4F,0x25, + 0x52,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x25,0x58,0x25,0x5B,0x25,0x5E,0x25,0x5F,0x1B,0x28,0x42,0x0D, + 0x0A,0x1B,0x24,0x42,0x25,0x60,0x25,0x61,0x25,0x62,0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,0x25,0x6A, + 0x1B,0x28,0x42,0x0D,0x0A, + /**/ + 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26, + 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B, + 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28, + 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32, + 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42, + 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B, + 0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x31,0x25,0x33,0x25,0x35,0x25,0x37,0x25,0x39,0x25,0x3B,0x25, + 0x3D,0x25,0x3F,0x1B,0x28,0x42,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24, + 0x42,0x25,0x41,0x25,0x44,0x25,0x46,0x25,0x48,0x25,0x4A,0x25,0x4B,0x25,0x4C,0x25,0x4D,0x1B,0x28,0x42, + 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x4E,0x25,0x4F,0x25, + 0x52,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x25,0x58,0x25,0x5B,0x25,0x5E,0x25,0x5F,0x1B,0x28,0x42,0x0D, + 0x0A,0x1B,0x24,0x42,0x25,0x60,0x25,0x61,0x25,0x62,0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,0x25,0x6A, + 0x1B,0x28,0x42,0x0D,0x0A, + /**/ + 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26, + 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B, + 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28, + 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32, + 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42, + 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B, + 0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x31,0x25,0x33,0x25,0x35,0x25,0x37,0x25,0x39,0x25,0x3B,0x25, + 0x3D,0x25,0x3F,0x1B,0x28,0x42,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24, + 0x42,0x25,0x41,0x25,0x44,0x25,0x46,0x25,0x48,0x25,0x4A,0x25,0x4B,0x25,0x4C,0x25,0x4D,0x1B,0x28,0x42, + 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0x1B,0x24,0x42,0x25,0x4E,0x25,0x4F,0x25, + 0x52,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x25,0x58,0x25,0x5B,0x25,0x5E,0x25,0x5F,0x1B,0x28,0x42,0x0D, + 0x0A,0x1B,0x24,0x42,0x25,0x60,0x25,0x61,0x25,0x62,0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,0x25,0x6A, + 0x1B,0x28,0x42,0x0D,0x0A, + /**/ + 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B,0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26, + 0x21,0x27,0x21,0x28,0x1B,0x28,0x42,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0x1B, + 0x24,0x42,0x21,0x29,0x21,0x2A,0x21,0x2B,0x21,0x2C,0x21,0x2D,0x21,0x2E,0x21,0x2F,0x21,0x30,0x1B,0x28, + 0x42,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0x1B,0x24,0x42,0x21,0x31,0x21,0x32, + 0x21,0x33,0x21,0x34,0x21,0x35,0x21,0x36,0x21,0x37,0x21,0x38,0x1B,0x28,0x42,0x0D,0x0A,0x1B,0x24,0x42, + 0x21,0x39,0x21,0x3A,0x21,0x3B,0x21,0x3C,0x21,0x3D,0x21,0x3E,0x21,0x3F,0x1B,0x28,0x42,0x5C,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x43,0x21,0x44,0x21,0x45,0x21,0x46,0x21,0x47,0x21,0x48,0x1B,0x28,0x42,0x0D,0x0A, + 0x1B,0x24,0x42,0x21,0x49,0x21,0x4A,0x21,0x4B,0x21,0x4C,0x25,0x2A,0x25,0x2B,0x25,0x2D,0x25,0x2F,0x1B, + 0x28,0x42,0x0D,0x0A, + 0x1B,0x28,0x42,0x0D,0x0A, + +}; +WCHAR iso2022jp_uniSource[]={ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C, +}; +WCHAR iso2022jp_uniSmSource[]={ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x00A8,0xFF3E, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0xFF7F,0xFF80 +}; +char iso2022jp_encSmSource[] ={ + 0x1B,0x24,0x42,0x21,0x21,0x21,0x22,0x21,0x23,0x1B, + 0x28,0x42,0x20,0x1B,0x24,0x42,0x21,0x25,0x21,0x26 +}; + +unsigned char sjis_encSource[]={ + 0x83,0x9F,0x83,0xA0,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8, + 0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2, + 0x83,0xB3,0x83,0xB4,0x83,0xB5,0x83,0xB6,0x83,0xBF,0x83,0xC0,0x83,0xC1,0x83,0xC2,0x83,0xC3,0x83,0xC4, + 0x83,0xC5,0x83,0xC6,0x83,0xC7,0x83,0xC8,0x83,0xC9,0x83,0xCA,0x83,0xCB,0x83,0xCC,0x83,0xCD,0x83,0xCE, + 0x83,0xCF,0x83,0xD0,0x83,0xD1,0x83,0xD2,0x83,0xD3,0x83,0xD4,0x83,0xD5,0x83,0xD6,0x84,0x46,0x84,0x40, + 0x84,0x41,0x84,0x42,0x84,0x43,0x84,0x44,0x84,0x45,0x84,0x47,0x84,0x48,0x84,0x49,0x84,0x4A,0x84,0x4B, + 0x84,0x4C,0x84,0x4D,0x84,0x4E,0x84,0x4F,0x84,0x50,0x84,0x51,0x84,0x52,0x84,0x53,0x84,0x54,0x84,0x55, + 0x84,0x56,0x84,0x57,0x84,0x58,0x84,0x59,0x84,0x5A,0x84,0x5B,0x84,0x5C,0x84,0x5D,0x84,0x5E,0x84,0x5F, + 0x84,0x60,0x84,0x70,0x84,0x71,0x84,0x72,0x84,0x73,0x84,0x74,0x84,0x75,0x84,0x77,0x84,0x78,0x84,0x79, + 0x84,0x7A,0x84,0x7B,0x84,0x7C,0x84,0x7D,0x84,0x7E,0x84,0x80,0x84,0x81,0x84,0x82,0x84,0x83,0x84,0x84, + 0x84,0x85,0x84,0x86,0x84,0x87,0x84,0x88,0x84,0x89,0x84,0x8A,0x84,0x8B,0x84,0x8C,0x84,0x8D,0x84,0x8E, + 0x84,0x8F,0x84,0x90,0x84,0x91,0x84,0x76,0x81,0x5D,0x81,0x5C,0x81,0x61,0x81,0x65,0x81,0x66,0x81,0x67, + 0x81,0x68,0x81,0xF5,0x81,0xF6,0x81,0x64,0x81,0x63,0x81,0xF1,0x81,0x8C,0x81,0x8D,0x81,0xA6,0x7E,0x81, + 0x8E,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13, + 0x14,0x15,0x16,0x17,0x18,0x19,0x7F,0x1B,0x1A,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27, + 0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B, + 0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, + 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4, + 0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE, + 0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE, + 0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0x9F,0x83,0xA0,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4, + 0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA,0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE, + 0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xB3,0x83,0xB4,0x83,0xB5,0x83,0xB6,0x83,0xBF,0x83,0xC0, + 0x83,0xC1,0x83,0xC2,0x83,0xC3,0x83,0xC4,0x83,0xC5,0x83,0xC6,0x83,0xC7,0x83,0xC8,0x83,0xC9,0x83,0xCA, + 0x83,0xCB,0x83,0xCC,0x83,0xCD,0x83,0xCE,0x83,0xCF,0x83,0xD0,0x83,0xD1,0x83,0xD2,0x83,0xD3,0x83,0xD4, + 0x83,0xD5,0x83,0xD6,0x84,0x46,0x84,0x40,0x84,0x41,0x84,0x42,0x84,0x43,0x84,0x44,0x84,0x45,0x84,0x47, + 0x84,0x48,0x84,0x49,0x84,0x4A,0x84,0x4B,0x84,0x4C,0x84,0x4D,0x84,0x4E,0x84,0x4F,0x84,0x50,0x84,0x51, + 0x84,0x52,0x84,0x53,0x84,0x54,0x84,0x55,0x84,0x56,0x84,0x57,0x84,0x58,0x84,0x59,0x84,0x5A,0x84,0x5B, + 0x84,0x5C,0x84,0x5D,0x84,0x5E,0x84,0x5F,0x84,0x60,0x84,0x70,0x84,0x71,0x84,0x72,0x84,0x73,0x84,0x74, + 0x84,0x75,0x84,0x77,0x84,0x78,0x84,0x79,0x84,0x7A,0x84,0x7B,0x84,0x7C,0x84,0x7D,0x84,0x7E,0x84,0x80, + 0x84,0x81,0x84,0x82,0x84,0x83,0x84,0x84,0x84,0x85,0x84,0x86,0x84,0x87,0x84,0x88,0x84,0x89,0x84,0x8A, + 0x84,0x8B,0x84,0x8C,0x84,0x8D,0x84,0x8E,0x84,0x8F,0x84,0x90,0x84,0x91,0x84,0x76,0x81,0x5D,0x81,0x5C, + 0x81,0x61,0x81,0x65,0x81,0x66,0x81,0x67,0x81,0x68,0x81,0xF5,0x81,0xF6,0x81,0x64,0x81,0x63,0x81,0xF1, + 0x81,0x8C,0x81,0x8D,0x81,0xA6,0x7E,0x81,0x8E,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B, + 0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x7F,0x1B,0x1A,0x1D,0x1E,0x1F, + 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33, + 0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47, + 0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B, + 0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA, + 0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xA9,0x83,0xAA, + 0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0x9F,0x83,0xA0, + 0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8,0x83,0xA9,0x83,0xAA, + 0x83,0xAB,0x83,0xAC,0x83,0xAD,0x83,0xAE,0x83,0xAF,0x83,0xB0,0x83,0xB1,0x83,0xB2,0x83,0xB3,0x83,0xB4, + 0x83,0xB5,0x83,0xB6,0x83,0xBF,0x83,0xC0,0x83,0xC1,0x83,0xC2,0x83,0xC3,0x83,0xC4,0x83,0xC5,0x83,0xC6, + 0x83,0xC7,0x83,0xC8,0x83,0xC9,0x83,0xCA,0x83,0xCB,0x83,0xCC,0x83,0xCD,0x83,0xCE,0x83,0xCF,0x83,0xD0, + 0x83,0xD1,0x83,0xD2,0x83,0xD3,0x83,0xD4,0x83,0xD5,0x83,0xD6,0x84,0x46,0x84,0x40,0x84,0x41,0x84,0x42, + 0x84,0x43,0x84,0x44,0x84,0x45,0x84,0x47,0x84,0x48,0x84,0x49,0x84,0x4A,0x84,0x4B,0x84,0x4C,0x84,0x4D, + 0x84,0x4E,0x84,0x4F,0x84,0x50,0x84,0x51,0x84,0x52,0x84,0x53,0x84,0x54,0x84,0x55,0x84,0x56,0x84,0x57, + 0x84,0x58,0x84,0x59,0x84,0x5A,0x84,0x5B,0x84,0x5C,0x84,0x5D,0x84,0x5E,0x84,0x5F,0x84,0x60,0x84,0x70, + 0x84,0x71,0x84,0x72,0x84,0x73,0x84,0x74,0x84,0x75,0x84,0x77,0x84,0x78,0x84,0x79,0x84,0x7A,0x84,0x7B, + 0x84,0x7C,0x84,0x7D,0x84,0x7E,0x84,0x80,0x84,0x81,0x84,0x82,0x84,0x83,0x84,0x84,0x84,0x85,0x84,0x86, + 0x84,0x87,0x84,0x88, + +}; + +WCHAR sjis_uniSource[]={ + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6, + 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, + 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, + 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C, + 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E, + 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6, + 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, + 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, + 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C, + 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E, + 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6, + 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, + 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6, + 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, + 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, + 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C, + 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E, + 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, + 0x03A6,0x03A7,0x03A8,0x03A9,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6, + 0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,0x03C0, + 0x03C1,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, + 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C, + 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E, + 0x2103,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x007F,0x001B,0x001A,0x001D, + 0x001E,0x001F,0x0020,0x0021, + +}; +WCHAR sjis_uniSmSource[]={ + 0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A, + 0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5, +}; +unsigned char sjis_encSmSource[]={ + 0x83,0x9F,0x83,0xA0,0x83,0xA1,0x83,0xA2,0x83,0xA3,0x83,0xA4,0x83,0xA5,0x83,0xA6,0x83,0xA7,0x83,0xA8, + +}; + +unsigned char eucjp_encSource[]={ + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x8E,0xE3,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63, + 0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77, + 0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x8E,0xE4,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A, + 0x8B,0x8C,0x8D,0xA6,0xD4,0xA6,0xD5,0xA6,0xD6,0xA6,0xD7,0xA6,0xD8,0xA7,0xA7,0xA7,0xA1,0xA7,0xA2,0xA7, + 0xA3,0xA7,0xA4,0xA7,0xA5,0xA7,0xA6,0xA7,0xA8,0xA7,0xA9,0xA7,0xAA,0xA7,0xAB,0xA7,0xAC,0xA7,0xAD,0xA7, + 0xAE,0xA7,0xAF,0xA7,0xB0,0xA7,0xB1,0xA7,0xB2,0xA7,0xB3,0xA7,0xB4,0xA7,0xB5,0xA7,0xB6,0xA7,0xB7,0xA7, + 0xB8,0xA7,0xB9,0xA7,0xBA,0xA7,0xBB,0xA7,0xBC,0xA7,0xBD,0xA7,0xBE,0xA7,0xBF,0xA7,0xC0,0xA7,0xC1,0xA7, + 0xD1,0xA7,0xD2,0xA7,0xD3,0xA7,0xD4,0xA7,0xD5,0xA7,0xD6,0xA7,0xD8,0xA7,0xD9,0xA7,0xDA,0xA7,0xDB,0xA7, + 0xDC,0xA7,0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7, + 0xE6,0xA7,0xE7,0xA7,0xE8,0xA7,0xE9,0xA7,0xEA,0xA7,0xEB,0xA7,0xEC,0xA7,0xED,0xA7,0xEE,0xA7,0xEF,0xA7, + 0xF0,0xA7,0xF1,0xA7,0xD7,0xA1,0xBE,0xA1,0xBD,0xA1,0xC2,0xA1,0xC6,0xA1,0xC7,0xA1,0xC8,0xA1,0xC9,0xA2, + 0xF7,0xA2,0xF8,0xA1,0xC5,0xA1,0xC4,0xA2,0xF3,0xA1,0xEC,0xA1,0xED,0xA2,0xA8,0x7E,0xA1,0xEE,0x8F,0xF3, + 0xB8,0x8F,0xF3,0xB9,0xA2,0xF2,0x8F,0xF3,0xAB,0x8F,0xF3,0xAC,0x8F,0xF3,0xAD,0x8F,0xF3,0xAE,0x8F,0xF3, + 0xAF,0x8F,0xF3,0xB0,0x8F,0xF3,0xB1,0x8F,0xF3,0xB2,0x8F,0xF3,0xB3,0x8F,0xF3,0xB4,0x8F,0xF3,0xA1,0x8F, + 0xF3,0xA2,0x8F,0xF3,0xA3,0x8F,0xF3,0xA4,0x8F,0xF3,0xA5,0x8F,0xF3,0xA6,0x8F,0xF3,0xA7,0xA1,0xC2,0x01, + 0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15, + 0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, + 0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D, + 0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51, + 0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x8E,0xE3,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + 0x79,0x7A,0x7B,0x7C,0x7D,0x8E,0xE4,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B, + 0x8C,0x8D,0xA6,0xD4,0xA6,0xD5,0xA6,0xD6,0xA6,0xD7,0xA6,0xD8,0xA7,0xA7,0xA7,0xA1,0xA7,0xA2,0xA7,0xA3, + 0xA7,0xA4,0xA7,0xA5,0xA7,0xA6,0xA7,0xA8,0xA7,0xA9,0xA7,0xAA,0xA7,0xAB,0xA7,0xAC,0xA7,0xAD,0xA7,0xAE, + 0xA7,0xAF,0xA7,0xB0,0xA7,0xB1,0xA7,0xB2,0xA7,0xB3,0xA7,0xB4,0xA7,0xB5,0xA7,0xB6,0xA7,0xB7,0xA7,0xB8, + 0xA7,0xB9,0xA7,0xBA,0xA7,0xBB,0xA7,0xBC,0xA7,0xBD,0xA7,0xBE,0xA7,0xBF,0xA7,0xC0,0xA7,0xC1,0xA7,0xD1, + 0xA7,0xD2,0xA7,0xD3,0xA7,0xD4,0xA7,0xD5,0xA7,0xD6,0xA7,0xD8,0xA7,0xD9,0xA7,0xDA,0xA7,0xDB,0xA7,0xDC, + 0xA7,0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,0xE6, + 0xA7,0xE7,0xA7,0xE8,0xA7,0xE9,0xA7,0xEA,0xA7,0xEB,0xA7,0xEC,0xA7,0xED,0xA7,0xEE,0xA7,0xEF,0xA7,0xF0, + 0xA7,0xF1,0xA7,0xD7,0xA1,0xBE,0xA1,0xBD,0xA1,0xC2,0xA1,0xC6,0xA1,0xC7,0xA1,0xC8,0xA1,0xC9,0xA2,0xF7, + 0xA2,0xF8,0xA1,0xC5,0xA1,0xC4,0xA2,0xF3,0xA1,0xEC,0xA1,0xED,0xA2,0xA8,0x7E,0xA1,0xEE,0x8F,0xF3,0xB8, + 0x8F,0xF3,0xB9,0xA2,0xF2,0x8F,0xF3,0xAB,0x8F,0xF3,0xAC,0x8F,0xF3,0xAD,0x8F,0xF3,0xAE,0x8F,0xF3,0xAF, + 0x8F,0xF3,0xB0,0x8F,0xF3,0xB1,0x8F,0xF3,0xB2,0x8F,0xF3,0xB3,0x8F,0xF3,0xB4,0x8F,0xF3,0xA1,0x8F,0xF3, + 0xA2,0x8F,0xF3,0xA3,0x8F,0xF3,0xA4,0x8F,0xF3,0xA5,0x8F,0xF3,0xA6,0x8F,0xF3,0xA7,0xA1,0xC2,0x01,0x02, + 0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16, + 0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A, + 0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E, + 0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52, + 0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x8E,0xE3,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65, + 0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79, + 0x7A,0x7B,0x7C,0x7D,0x8E,0xE4,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C, + 0x8D,0xA6,0xD4,0xA6,0xD5,0xA6,0xD6,0xA6,0xD7,0xA6,0xD8,0xA7,0xA7,0xA7,0xA1,0xA7,0xA2,0xA7,0xA3,0xA7, + 0xA4,0xA7,0xA5,0xA7,0xA6,0xA7,0xA8,0xA7,0xA9,0xA7,0xAA,0xA7,0xAB,0xA7,0xAC,0xA7,0xAD,0xA7,0xAE,0xA7, + 0xAF,0xA7,0xB0,0xA7,0xB1,0xA7,0xB2,0xA7,0xB3,0xA7,0xB4,0xA7,0xB5,0xA7,0xB6,0xA7,0xB7,0xA7,0xB8,0xA7, + 0xB9,0xA7,0xBA,0xA7,0xBB,0xA7,0xBC,0xA7,0xBD,0xA7,0xBE,0xA7,0xBF,0xA7,0xC0,0xA7,0xC1,0xA7,0xD1,0xA7, + 0xD2,0xA7,0xD3,0xA7,0xD4,0xA7,0xD5,0xA7,0xD6,0xA7,0xD8,0xA7,0xD9,0xA7,0xDA,0xA7,0xDB,0xA7,0xDC,0xA7, + 0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,0xE6,0xA7, + 0xF1,0xA7,0xD7,0xA1,0xBE, +}; + +WCHAR eucjp_uniSource[]={ + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065, + 0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, + 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079, + 0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,0x30FB,0x32A7, + 0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, + 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C, + 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E, + 0x2103,0x5834,0x0057,0x5834,0x0058,0x212B,0x5834,0x004A,0x5834,0x004B, + 0x5834,0x004C,0x5834,0x004D,0x5834,0x004E,0x5834,0x004F,0x5834,0x0050, + 0x5834,0x0051,0x5834,0x0052,0x5834,0x0053,0x5834,0x0040,0x5834,0x0041, + 0x5834,0x0042,0x5834,0x0043,0x5834,0x0044,0x5834,0x0045,0x5834,0x0046, + 0x2225,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + 0x0079,0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,0x30FB, + 0x32A7,0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,0x0401, + 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419, + 0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423, + 0x0424,0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D, + 0x042E,0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437, + 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441, + 0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B, + 0x044C,0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019, + 0x201C,0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B, + 0x007E,0x2103,0x5834,0x0057,0x5834,0x0058,0x212B,0x5834,0x004A,0x5834, + 0x004B,0x5834,0x004C,0x5834,0x004D,0x5834,0x004E,0x5834,0x004F,0x5834, + 0x0050,0x5834,0x0051,0x5834,0x0052,0x5834,0x0053,0x5834,0x0040,0x5834, + 0x0041,0x5834,0x0042,0x5834,0x0043,0x5834,0x0044,0x5834,0x0045,0x5834, + 0x0046,0x2225,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008, + 0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012, + 0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C, + 0x001D,0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026, + 0x0027,0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030, + 0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A, + 0x003B,0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044, + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063, + 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D, + 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, + 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4, + 0x30FB,0x32A7,0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9, + 0x0401,0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418, + 0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422, + 0x0423,0x0424,0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C, + 0x042D,0x042E,0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436, + 0x0437,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440, + 0x0441,0x0442,0x0443,0x0444,0x044F,0x0451,0x2010,0x043E,0x043F,0x0440, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x7DC7,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064,0x0065, + 0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F, + 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079, + 0x007A,0x007B,0x007C,0x007D,0x30FB,0x0080,0x2260,0x30E4,0x30FB,0x32A7, + 0x708E,0x65E7,0x9D3B,0xFF92,0x03C6,0x03C7,0x03C8,0x03C9,0x0401,0x0410, + 0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A, + 0x041B,0x041C,0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424, + 0x0425,0x0426,0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E, + 0x042F,0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438, + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, + 0x044D,0x044E,0x044F,0x0451,0x2010,0x2015,0x2225,0x2018,0x2019,0x201C, + 0x201D,0x2020,0x2021,0x2025,0x2026,0x2030,0x2032,0x2033,0x203B,0x007E, + 0x2103,0x5834,0x0057,0x5834,0x0058,0x212B,0x5834,0x004A,0x5834,0x004B, + 0x5834,0x004C,0x5834,0x004D,0x5834,0x004E,0x5834,0x004F,0x5834,0x0050, + 0x5834,0x0051,0x5834,0x0052,0x5834,0x0053,0x5834,0x0040,0x5834,0x0041, + 0x5834,0x0042,0x5834,0x0043,0x5834,0x0044,0x5834,0x0045,0x5834,0x0046, + 0x2225,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0041,0x5834,0x0042,0x5834, +}; + +WCHAR eucjp_uniSmSource[]={ + 0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442, + 0x0443,0x0444,0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C, +}; +unsigned char eucjp_encSmSource[]={ + 0xA7,0xDD,0xA7,0xDE,0xA7,0xDF,0xA7,0xE0,0xA7,0xE1,0xA7,0xE2,0xA7,0xE3,0xA7,0xE4,0xA7,0xE5,0xA7,0xE6, +}; + +unsigned char iso2022kr_encSource[]={ + 0x1B,0x24,0x29,0x43, + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x0E, + 0x73,0x51,0x69,0x51,0x73,0x29,0x50,0x60,0x69,0x52,0x5A,0x63,0x62,0x52,0x76,0x22,0x61,0x74,0x5A,0x64, + 0x0F,0x0A,0x0D,0x0E,0x67,0x55,0x75,0x3F,0x4F,0x22,0x4D,0x2F,0x0F,0x0A,0x0D,0x0F,0x0A,0x0D, + /**/ + + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D,0x0E,0x65, + 0x61,0x64,0x4B,0x57,0x23,0x5B,0x42,0x4A,0x7E,0x4F,0x4F,0x30,0x21,0x30,0x22,0x0E,0x30,0x23, + 0x30,0x24,0x30,0x25,0x30,0x26,0x0F,0x25,0x26,0x27,0x0A,0x0D,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E, + 0x0F,0x0A,0x0D, + +}; +WCHAR iso2022kr_uniSource[]={ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027,0x000A,0x000D,0x0028,0x0029,0x002A,0x002B, + 0x002C,0x002D,0x002E,0x53C3,0x53C8,0x53C9,0x53CA,0x53CB,0x53CD,0x53D4, + 0x53D6,0x53D7,0x53DB,0x000A,0x000D,0x53E1,0x53E2,0x53E3,0x53E4,0x53CD, + /**/ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, + 0xAC09,0x0025,0x0026,0x0027 + +}; + +unsigned char iso2022kr_encSmSource[]={ + 0x1B,0x24,0x29,0x43, + 0x0E,0x6E,0x31,0x6E,0x32,0x76,0x4D,0x6E,0x52,0x56,0x46,0x60,0x65,0x73,0x3B,0x0F,0x0A,0x0D +}; +WCHAR iso2022kr_uniSmSource[]={ + 0x9F4B,0x9F4E,0x9F52,0x9F5F,0x9F61,0x9F67,0x9F6A,0x000A,0x000D,0x9F6C, + 0x9F77,0x9F8D,0x9F90,0x9F95,0x9F9C,0xAC00,0xAC01,0xAC04,0xAC07,0xAC08, +}; +unsigned char gb2312_encSource[]={ + 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75, + 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A, + 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, + 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A, + 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F, + 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B, + 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E, + 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3, + 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, + 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2, + 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82, + 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82, + 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6, + + 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75, + 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A, + 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, + 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A, + 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F, + 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B, + 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E, + 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3, + 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, + 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2, + 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82, + 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82, + 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6, + + 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75, + 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A, + 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, + 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A, + 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F, + 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B, + 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E, + 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3, + 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, + 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2, + 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82, + 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82, + 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6, + + 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75, + 0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x82,0x76,0x82,0x77,0x82,0x78,0x82,0x79,0x82,0x7A, + 0x82,0x7B,0x82,0x7C,0x82,0x7D,0x82,0x7E,0x82,0x80,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57, + 0x82,0x81,0x82,0x82,0x82,0x83,0x82,0x84,0x82,0x85,0x82,0x86,0x82,0x87,0x82,0x88,0x82,0x89,0x82,0x8A, + 0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x82,0x8B,0x82,0x8C,0x82,0x8D,0x82,0x8E,0x82,0x8F, + 0x82,0x90,0x82,0x91,0x82,0x92,0x82,0x93,0x82,0x94,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B, + 0x82,0x95,0x82,0x96,0x82,0x97,0x82,0x98,0x82,0x99,0x82,0x9A,0x82,0x9B,0x82,0x9C,0x82,0x9D,0x82,0x9E, + 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x82,0x9F,0x82,0xA0,0x82,0xA1,0x82,0xA2,0x82,0xA3, + 0x82,0xA4,0x82,0xA5,0x82,0xA6,0x82,0xA7,0x82,0xA8,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, + 0x82,0xA9,0x82,0xAA,0x82,0xAB,0x82,0xAC,0x82,0xAD,0x82,0xAE,0x82,0xAF,0x82,0xB0,0x82,0xB1,0x82,0xB2, + 0x82,0xC7,0x82,0xC8,0x82,0xC9,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x82,0xB3,0x82,0xB4,0x82,0xB5,0x82, + 0xB6,0x82,0xB7,0x82,0xB8,0x82,0xB9,0x82,0xBA,0x82,0xBB,0x82,0xBC,0x82,0xBD,0x82,0xBE,0x82,0xBF,0x82, + 0xC0,0x82,0xC1,0x82,0xC2,0x82,0xC3,0x82,0xC4,0x82,0xC5,0x82,0xC6,0x82,0xC4,0x82, +}; +WCHAR gb2312_uniSource[]={ + 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, + 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174, + 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208, + 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229, + 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C, + 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460, + 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474, + 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E, + 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488, + 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492, + 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500, + 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A, + 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514, + 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E, + 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528, + 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532, + 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C, + 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546, + 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC, + 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642, + 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4, + 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394, + 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E, + 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, + 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA, + + 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, + 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174, + 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208, + 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229, + 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C, + 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460, + 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474, + 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E, + 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488, + 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492, + 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500, + 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A, + 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514, + 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E, + 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528, + 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532, + 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C, + 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546, + 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC, + 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642, + 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4, + 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394, + 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E, + 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, + 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA, + + 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, + 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174, + 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208, + 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229, + 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C, + 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460, + 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474, + 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E, + 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488, + 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492, + 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500, + 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A, + 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514, + 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E, + 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528, + 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532, + 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C, + 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546, + 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC, + 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642, + 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4, + 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394, + 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E, + 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, + 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA, + + 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, + 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174, + 0x2175,0x2176,0x2177,0x2178,0x2179,0x2190,0x2191,0x2192,0x2193,0x2208, + 0x220F,0x2211,0x221A,0x221D,0x221E,0x2220,0x2225,0x2227,0x2228,0x2229, + 0x222A,0x222B,0x222E,0x2234,0x2235,0x2236,0x2237,0x223D,0x2248,0x224C, + 0x2260,0x2261,0x2264,0x2265,0x226E,0x226F,0x2299,0x22A5,0x2312,0x2460, + 0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2474, + 0x2475,0x2476,0x2477,0x2478,0x2479,0x247A,0x247B,0x247C,0x247D,0x247E, + 0x247F,0x2480,0x2481,0x2482,0x2483,0x2484,0x2485,0x2486,0x2487,0x2488, + 0x2489,0x248A,0x248B,0x248C,0x248D,0x248E,0x248F,0x2490,0x2491,0x2492, + 0x2493,0x2494,0x2495,0x2496,0x2497,0x2498,0x2499,0x249A,0x249B,0x2500, + 0x2501,0x2502,0x2503,0x2504,0x2505,0x2506,0x2507,0x2508,0x2509,0x250A, + 0x250B,0x250C,0x250D,0x250E,0x250F,0x2510,0x2511,0x2512,0x2513,0x2514, + 0x2515,0x2516,0x2517,0x2518,0x2519,0x251A,0x251B,0x251C,0x251D,0x251E, + 0x251F,0x2520,0x2521,0x2522,0x2523,0x2524,0x2525,0x2526,0x2527,0x2528, + 0x2529,0x252A,0x252B,0x252C,0x252D,0x252E,0x252F,0x2530,0x2531,0x2532, + 0x2533,0x2534,0x2535,0x2536,0x2537,0x2538,0x2539,0x253A,0x253B,0x253C, + 0x253D,0x253E,0x253F,0x2540,0x2541,0x2542,0x2543,0x2544,0x2545,0x2546, + 0x2547,0x2548,0x2549,0x254A,0x254B,0x25A0,0x25A1,0x25B2,0x25B3,0x25BC, + 0x25BD,0x25C6,0x25C7,0x25CB,0x25CE,0x25CF,0x2605,0x2606,0x2640,0x2642, + 0x0101,0x0113,0x011B,0x012B,0x014D,0x016B,0x01CE,0x01D0,0x01D2,0x01D4, + 0x01D6,0x01D8,0x01DA,0x01DC,0x02C7,0x02C9,0x0391,0x0392,0x0393,0x0394, + 0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E, + 0x039F,0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9, + 0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA, + + 0x2103,0x2116,0x2121,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166, + 0x2167,0x2168,0x2169,0x216A,0x216B,0x2170,0x2171,0x2172,0x2173,0x2174, + 0x2175,0x2176,0x2177,0x2178, +}; + +WCHAR gb2312_uniSmSource[]={ + 0x4FF5,0x4FF6,0x4FF7,0x4FF9,0x4FFB,0x4FFC,0x4FFD,0x4FFF,0x5000,0x5001, + 0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D +}; +unsigned char gb2312_encSmSource[]={ + 0x82,0x6C,0x82,0x6D,0x82,0x6E,0x82,0x6F,0x82,0x70,0x82,0x71,0x82,0x72,0x82,0x73,0x82,0x74,0x82,0x75 +}; + +unsigned char latin1_encSource[]={ + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40, + +}; + +WCHAR latin1_uniSource[]={ + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040 + +}; + +unsigned char latin2_encSource[]={ + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40, + + +}; +WCHAR latin2_uniSource[]={ + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x0015,0x0016,0x0017,0x0018, + +}; + +unsigned char latin3_encSource[]={ + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18, + + +}; +WCHAR latin3_uniSource[]={ + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018, + +}; + +unsigned char latin4_encSource[]={ + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18, +}; +WCHAR latin4_uniSource[]={ + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018, +}; + unsigned char latin5_encSource[]={ + 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2, + 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7, + 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4, + 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA, + 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0, + 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC, + 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3, + 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF, + 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6, + 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB, + 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8, + 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, + 0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE, + 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2, + 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7, + 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4, + 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA, + 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0, + 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC, + 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3, + 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF, + 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6, + 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB, + 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8, + 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, + 0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE, + 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2, + 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7, + 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4, + 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA, + 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0, + 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC, + 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3, + 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF, + 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6, + 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB, + 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8, + 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, + 0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE, + 0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2, + 0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7, + 0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4, + 0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA, + 0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0, + 0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC, + 0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3, + 0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF, + 0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6, + 0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB, + 0xFC,0xFF,0xD0,0xF0,0xDD,0xFD,0xDE,0xFE,0xCC,0xCD,0xCE,0xCF,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8, + 0xD9,0xDA,0xDB,0xDC,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, + 0xEF,0xF1,0xF2,0xF3 + +}; + +WCHAR latin5_uniSource[]={ + 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063, + 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D, + 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, + 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081, + 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B, + 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095, + 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407, + 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412, + 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C, + 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, + 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430, + 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A, + 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444, + 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, + 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, + /**/ + 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063, + 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D, + 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, + 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081, + 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B, + 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095, + 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407, + 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412, + 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C, + 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, + 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430, + 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A, + 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444, + 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, + 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, + /**/ + 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063, + 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D, + 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, + 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081, + 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B, + 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095, + 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407, + 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412, + 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C, + 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, + 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430, + 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A, + 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444, + 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, + 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, + /**/ + 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063, + 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D, + 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, + 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081, + 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B, + 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095, + 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407, + 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412, + 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C, + 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, + 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430, + 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A, + 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444, + 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, + 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, + /**/ + 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D, + 0x001E,0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027, + 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031, + 0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B, + 0x003C,0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045, + 0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F, + 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059, + 0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063, + 0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D, + 0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, + 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081, + 0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B, + 0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095, + 0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F, + 0x00A0,0x00A7,0x00AD,0x0401,0x0402,0x0403,0x0404,0x0405,0x0406,0x0407, + 0x0408,0x0409,0x040A,0x040B,0x040C,0x040E,0x040F,0x0410,0x0411,0x0412, + 0x0413,0x0414,0x0415,0x0416,0x0417,0x0418,0x0419,0x041A,0x041B,0x041C, + 0x041D,0x041E,0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, + 0x0427,0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,0x0430, + 0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,0x0438,0x0439,0x043A, + 0x043B,0x043C,0x043D,0x043E,0x043F,0x0440,0x0441,0x0442,0x0443,0x0444, + 0x0445,0x0446,0x0447,0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E, + 0x044F,0x0451,0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459, + /**/ + 0x2116,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009, + 0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013, + 0x0014,0x0015,0x0016,0x0017, + +}; +unsigned char latin6_encSource[]={ + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, + 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B, + 0x9C,0x9D,0x9E,0x9F,0xA0,0xA4,0xAD,0xAC,0xBB,0xBF,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA, + 0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xE0,0xE1,0xE2,0xE3, + + 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73, + 0x74,0x75,0x76,0x77, +}; +WCHAR latin6_uniSource[]={ + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D, + 0x007E,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A4,0x00AD,0x060C,0x061B,0x061F, + 0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,0x0628,0x0629,0x062A, + 0x062B,0x062C,0x062D,0x062E,0x062F,0x0630,0x0631,0x0632,0x0633,0x0634, + 0x0635,0x0636,0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643, + + 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069, + 0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073, + 0x0074,0x0075,0x0076,0x0077 +}; + +unsigned char latin7_encSource[]={ + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + 0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C, + 0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0, + 0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1,0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9, + 0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, + 0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4, + 0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8, + 0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A, + 0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E, + 0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32, + 0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46, + 0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A, + 0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E, + 0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82, + 0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96, + 0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1, + 0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5, + 0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA, + 0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, + 0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8, + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14, + 0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, + 0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C, + 0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64, + 0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78, + 0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C, + 0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0, + 0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1,0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9, + 0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, + 0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4, + 0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8, + 0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A, + 0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E, + 0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32, + 0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x41,0x42,0x43,0x44,0x45,0x46, + 0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A, + 0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E, + 0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80,0x81,0x82, + 0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94,0x95,0x96, + 0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA3,0xA6,0xA7,0xA8,0xA9,0xAB,0xAC,0xAD,0xB0,0xB1, + 0xB2,0xB3,0xB4,0xBB,0xBD,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBC,0xBE,0xBF,0xC0,0xC1,0xC2,0xC3,0xC4,0xC5, + 0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA, + 0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE, + 0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xF5,0xF6,0xF7,0xF8, + 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A, + 0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18, + + +}; +WCHAR latin7_uniSource[]={ + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082, + 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C, + 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096, + 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0, + 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1, + 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389, + 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395, + 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, + 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA, + 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4, + 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE, + 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, + 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8, + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082, + 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C, + 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096, + 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0, + 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1, + 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389, + 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395, + 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, + 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA, + 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4, + 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE, + 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, + 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8, + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082, + 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C, + 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096, + 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0, + 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1, + 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389, + 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395, + 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, + 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA, + 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4, + 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE, + 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, + 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8, + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, + 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028, + 0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,0x0030,0x0031,0x0032, + 0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003A,0x003B,0x003C, + 0x003D,0x003E,0x003F,0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046, + 0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,0x0050, + 0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A, + 0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062,0x0063,0x0064, + 0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E, + 0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078, + 0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080,0x0081,0x0082, + 0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C, + 0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096, + 0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,0x00A0, + 0x00A3,0x00A6,0x00A7,0x00A8,0x00A9,0x00AB,0x00AC,0x00AD,0x00B0,0x00B1, + 0x00B2,0x00B3,0x0384,0x00BB,0x00BD,0x0385,0x0386,0x00B7,0x0388,0x0389, + 0x038A,0x038C,0x038E,0x038F,0x0390,0x0391,0x0392,0x0393,0x0394,0x0395, + 0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F, + 0x03A0,0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,0x03AA, + 0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,0x03B0,0x03B1,0x03B2,0x03B3,0x03B4, + 0x03B5,0x03B6,0x03B7,0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE, + 0x03BF,0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,0x03C8, + 0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x03C5,0x03C6,0x03C7,0x03C8, + 0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000A, + 0x000B,0x000C,0x000D,0x000E,0x000F,0x0010,0x0011,0x0012,0x0013,0x0014, + 0x0015,0x0016,0x0017,0x0018 + }; + +unsigned char latin8_encSource[]={ + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,0x80, + 0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0x92,0x93,0x94, + 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + + 0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x5B,0x5C, + +}; +WCHAR latin8_uniSource[]={ + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,0x0060,0x0061,0x0062, + 0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006A,0x006B,0x006C, + 0x006D,0x006E,0x006F,0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076, + 0x0077,0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,0x0080, + 0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A, + 0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,0x0092,0x0093,0x0094, + 0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E, + 0x009F,0x00A0,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,0x00A8,0x00A9, + + 0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E, + 0x004F,0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058, + 0x0059,0x005A,0x005B,0x005C, +}; +unsigned char ebcdic_arabic_encSource[]={ + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + 0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0xA1,0x79,0xC0,0xD0,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,0x41,0x4A,0x6A,0x5F,0xCA,0xE0, + 0x4F,0x07,0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,0x30,0x31, + + 0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9, + 0x4F,0x07,0x20,0x21, + +}; +WCHAR ebcdic_arabic_uniSource[]={ + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + 0x009C,0x009D,0x009E,0x009F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x00F7,0x060C,0x061B,0x061F,0x00A0,0x00A2,0x00A6,0x00AC,0x00AD,0x00D7, + 0x007C,0x007F,0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, + 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091, + 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B, + + + 0x0067,0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,0x0070, + 0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007A, + 0x007C,0x007F,0x0080,0x0081, +}; + + +unsigned char utf8_encSource[]={ + 0xE3,0x80,0x80,0xE3,0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB, + 0xEF,0xBC,0x9A,0xEF,0xBC,0x9B,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A, + 0x0D,0x0A,0xEF,0xBC,0x9F,0xEF,0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4, + 0xEF,0xBD,0x80,0xC2,0xA8,0xEF,0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50, + 0x51,0x52,0x0D,0x0A,0xEF,0xBF,0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE, + 0xE3,0x82,0x9D,0xE3,0x82,0x9E,0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80, + 0x85,0xE3,0x80,0x86,0xE3,0x80,0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90, + 0xEF,0xBC,0x8F,0x5C,0x0D,0x0A,0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2, + 0x80,0x98,0xE2,0x80,0x99,0xE2,0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88, + 0xEF,0xBC,0x89,0xE3,0x80,0x94,0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF, + 0xBD,0xB8,0x0D,0x0A,0xEF,0xBD,0xB9,0xEF,0xBD,0xBA,0xEF,0xBD,0xBB,0xEF,0xBD,0xBC, + 0xEF,0xBD,0xBD,0xEF,0xBD,0xBE,0xEF,0xBD,0xBF,0xEF,0xBE,0x80,0x0D,0x0A,0x53,0x54, + 0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x81,0xEF,0xBE,0x82,0xEF,0xBE, + 0x83,0xEF,0xBE,0x84,0xEF,0xBE,0x85,0xEF,0xBE,0x86,0xEF,0xBE,0x87,0xEF,0xBE,0x88, + 0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x89,0xEF, + 0xBE,0x8A,0xEF,0xBE,0x8B,0x20,0xEF,0xBE,0x8D,0xEF,0xBE,0x8E,0xEF,0xBE,0x8F,0xEF, + 0xBE,0x90,0x0D,0x0A,0xEF,0xBE,0x91,0xEF,0xBE,0x92,0xEF,0xBE,0x93,0xEF,0xBE,0x94, + 0xEF,0xBE,0x95,0xEF,0xBE,0x96,0xEF,0xBE,0x97,0xEF,0xBE,0x98,0x0D,0x0A,0xE3,0x80, + 0x80,0xE3,0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,0xEF,0xBC, + 0x9A,0xEF,0xBC,0x9B,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A, + 0xEF,0xBC,0x9F,0xEF,0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,0xEF,0xBD, + 0x80,0xC2,0xA8,0xEF,0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52, + 0x0D,0x0A,0xEF,0xBF,0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,0xE3,0x82, + 0x9D,0xE3,0x82,0x9E,0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,0x85,0xE3, + 0x80,0x86,0xE3,0x80,0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,0xEF,0xBC, + 0x8F,0x5C,0x0D,0x0A,0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,0x80,0x98, + 0xE2,0x80,0x99,0xE2,0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,0xEF,0xBC, + 0x89,0xE3,0x80,0x94,0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,0xBD,0xB8, + 0x0D,0x0A,0xEF,0xBD,0xB9,0xEF,0xBD,0xBA,0xEF,0xBD,0xBB,0xEF,0xBD,0xBC,0xEF,0xBD, + 0xBD,0xEF,0xBD,0xBE,0xEF,0xBD,0xBF,0xEF,0xBE,0x80,0x0D,0x0A,0x53,0x54,0x55,0x56, + 0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x81,0xEF,0xBE,0x82,0xEF,0xBE,0x83,0xEF, + 0xBE,0x84,0xEF,0xBE,0x85,0xEF,0xBE,0x86,0xEF,0xBE,0x87,0xEF,0xBE,0x88,0x0D,0x0A, + 0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x89,0xEF,0xBE,0x8A, + 0xEF,0xBE,0x8B,0x20,0xEF,0xBE,0x8D,0xEF,0xBE,0x8E,0xEF,0xBE,0x8F,0xEF,0xBE,0x90, + 0x0D,0x0A,0xEF,0xBE,0x91,0xEF,0xBE,0x92,0xEF,0xBE,0x93,0xEF,0xBE,0x94,0xEF,0xBE, + 0x95,0xEF,0xBE,0x96,0xEF,0xBE,0x97,0xEF,0xBE,0x98,0x0D,0x0A,0xE3,0x80,0x80,0xE3, + 0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,0xEF,0xBC,0x9A,0xEF, + 0xBC,0x9B,0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0xEF,0xBC, + 0x9F,0xEF,0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,0xEF,0xBD,0x80,0xC2, + 0xA8,0xEF,0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A, + 0xEF,0xBF,0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,0xE3,0x82,0x9D,0xE3, + 0x82,0x9E,0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,0x85,0xE3,0x80,0x86, + 0xE3,0x80,0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,0xEF,0xBC,0x8F,0x5C, + 0x0D,0x0A,0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,0x80,0x98,0xE2,0x80, + 0x99,0xE2,0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,0xEF,0xBC,0x89,0xE3, + 0x80,0x94,0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,0xBD,0xB8,0x0D,0x0A, + 0xEF,0xBD,0xB9,0xEF,0xBD,0xBA,0xEF,0xBD,0xBB,0xEF,0xBD,0xBC,0xEF,0xBD,0xBD,0xEF, + 0xBD,0xBE,0xEF,0xBD,0xBF,0xEF,0xBE,0x80,0x0D,0x0A,0x53,0x54,0x55,0x56,0x57,0x58, + 0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x81,0xEF,0xBE,0x82,0xEF,0xBE,0x83,0xEF,0xBE,0x84, + 0xEF,0xBE,0x85,0xEF,0xBE,0x86,0xEF,0xBE,0x87,0xEF,0xBE,0x88,0x0D,0x0A,0x53,0x54, + 0x55,0x56,0x57,0x58,0x59,0x5A,0x0D,0x0A,0xEF,0xBE,0x89,0xEF,0xBE,0x8A,0xEF,0xBE, + 0x8B,0x20,0xEF,0xBE,0x8D,0xEF,0xBE,0x8E,0xEF,0xBE,0x8F,0xEF,0xBE,0x90,0x0D,0x0A, + 0xEF,0xBE,0x91,0xEF,0xBE,0x92,0xEF,0xBE,0x93,0xEF,0xBE,0x94,0xEF,0xBE,0x95,0xEF, + 0xBE,0x96,0xEF,0xBE,0x97,0xEF,0xBE,0x98,0x0D,0x0A,0xE3,0x80,0x80,0xE3,0x80,0x81, + 0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB,0xEF,0xBC,0x9A,0xEF,0xBC,0x9B, + 0x0D,0x0A,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x0D,0x0A,0xEF,0xBC,0x9F,0xEF, + 0xBC,0x81,0xE3,0x82,0x9B,0xE3,0x82,0x9C,0xC2,0xB4,0xEF,0xBD,0x80,0xC2,0xA8,0xEF, + 0xBC,0xBE,0x0D,0x0A,0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x0D,0x0A,0xEF,0xBF, + 0xA3,0xEF,0xBC,0xBF,0xE3,0x83,0xBD,0xE3,0x83,0xBE,0xE3,0x82,0x9D,0xE3,0x82,0x9E, + 0xE3,0x80,0x83,0xE4,0xBB,0x9D,0x0D,0x0A,0xE3,0x80,0x85,0xE3,0x80,0x86,0xE3,0x80, + 0x87,0xE3,0x83,0xBC,0xE2,0x80,0x95,0xE2,0x80,0x90,0xEF,0xBC,0x8F,0x5C,0x0D,0x0A, + 0xEF,0xBD,0x9C,0xE2,0x80,0xA6,0xE2,0x80,0xA5,0xE2,0x80,0x98,0xE2,0x80,0x99,0xE2, + 0x80,0x9C,0x0D,0x0A,0xE2,0x80,0x9D,0xEF,0xBC,0x88,0xEF,0xBC,0x89,0xE3,0x80,0x94, + 0xEF,0xBD,0xB5,0xEF,0xBD,0xB6,0xEF,0xBD,0xB7,0xEF,0xBD,0xB8,0x0D,0x0A + +}; +WCHAR utf8_uniSource[]={ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C,0x000D,0x000A, + /*0x301C,0x2016,*/ 0xFF5C,0x2026,0x2025,0x2018,0x2019,0x201C,0x000D,0x000A, + 0x201D,0xFF08,0xFF09,0x3014,0xFF75,0xFF76,0xFF77,0xFF78,0x000D,0x000A, + 0xFF79,0xFF7A,0xFF7B,0xFF7C,0xFF7D,0xFF7E,0xFF7F,0xFF80,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF81,0xFF82,0xFF83,0xFF84,0xFF85,0xFF86,0xFF87,0xFF88,0x000D,0x000A, + 0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005A,0x000D,0x000A, + 0xFF89,0xFF8A,0xFF8B,0x0020,0xFF8D,0xFF8E,0xFF8F,0xFF90,0x000D,0x000A, + 0xFF91,0xFF92,0xFF93,0xFF94,0xFF95,0xFF96,0xFF97,0xFF98,0x000D,0x000A, + /**/ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, + 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,0x000D,0x000A, + 0x004B,0x004C,0x004D,0x004E,0x004F,0x0050,0x0051,0x0052,0x000D,0x000A, + 0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,0x000D,0x000A, + 0x3005,0x3006,0x3007,0x30FC,0x2015,0x2010,0xFF0F,0x005C, +}; + +WCHAR utf8_uniSmSource[]={ + 0x3000,0x3001,0x3002,0x0020,0xFF0E,0x30FB,0xFF1A,0xFF1B,0x000D,0x000A, + 0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004A,0x000D,0x000A, +}; +unsigned char utf8_encSmSource[]={ + 0xE3,0x80,0x80,0xE3,0x80,0x81,0xE3,0x80,0x82,0x20,0xEF,0xBC,0x8E,0xE3,0x83,0xBB, + 0xEF,0xBC,0x9A,0xEF,0xBC,0x9B,0x0D,0x0A +}; +#endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in new file mode 100644 index 00000000000..8b35cab0465 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/normperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/normperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = normperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = normperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl new file mode 100755 index 00000000000..2f8df8c0129 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * Copyright (c) 2002-2007, International Business Machines +# * Corporation and others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Normalization performance: ICU vs. Win", + "headers"=>"Win ICU", + "operationIs"=>"code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/LocalCVS/icu4c/collation-perf-data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "Release/normperf.exe -b -u"; + +my $tests = { + "NFC_NFD_Text", ["$p TestWin_NFC_NFD_Text" , "$p TestICU_NFC_NFD_Text" ], + "NFC_NFC_Text", ["$p TestWin_NFC_NFC_Text" , "$p TestICU_NFC_NFC_Text" ], + "NFC_Orig_Text", ["$p TestWin_NFC_Orig_Text" , "$p TestICU_NFC_Orig_Text"], + "NFD_NFD_Text", ["$p TestWin_NFD_NFD_Text" , "$p TestICU_NFD_NFD_Text" ], + "NFD_NFC_Text", ["$p TestWin_NFD_NFC_Text" , "$p TestICU_NFD_NFC_Text" ], + "NFD_Orig_Text", ["$p TestWin_NFD_Orig_Text" , "$p TestICU_NFD_Orig_Text"] + }; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Japanese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", + "th18057.txt", + "thesis.txt", + "vfear11a.txt", + ] + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl new file mode 100644 index 00000000000..92900072be7 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/NormPerf_r.pl @@ -0,0 +1,79 @@ +#!/usr/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2007, International Business Machines +# * Corporation and others. All Rights Reserved. +# ******************************************************************** + +use strict; + +#Assume we are running outside of the ICU source +use lib './ICU-3.0/ICU/source/test/perf/perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Normalization performance regression (ICU 2.8 and 3.0)", + "headers"=>"ICU28 ICU30", + "operationIs"=>"code point", + "timePerOperationIs"=>"Time per code point", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"results_ICU4C" + }; + +# programs + +my $p1 = "icu-2.8/icu/bin/normperf28.exe -b -u"; +my $p2 = "icu-3.0/icu/bin/normperf30.exe -b -u"; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Japanese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", +# "th18057.txt", +# "thesis.txt", +# "vfear11a.txt", + ] + }; + + +my $tests = { + "NFC_NFD_Text", ["$p1 TestICU_NFC_NFD_Text" , "$p2 TestICU_NFC_NFD_Text" ], + "NFC_NFC_Text", ["$p1 TestICU_NFC_NFC_Text" , "$p2 TestICU_NFC_NFC_Text" ], + "NFC_Orig_Text", ["$p1 TestICU_NFC_Orig_Text" , "$p2 TestICU_NFC_Orig_Text"], + "NFD_NFD_Text", ["$p1 TestICU_NFD_NFD_Text" , "$p2 TestICU_NFD_NFD_Text" ], + "NFD_NFC_Text", ["$p1 TestICU_NFD_NFC_Text" , "$p2 TestICU_NFD_NFC_Text" ], + "NFD_Orig_Text", ["$p1 TestICU_NFD_Orig_Text" , "$p2 TestICU_NFD_Orig_Text"], + ## + "QC_NFC_NFD_Text", ["$p1 TestQC_NFC_NFD_Text" , "$p2 TestQC_NFC_NFD_Text" ], + "QC_NFC_NFC_Text", ["$p1 TestQC_NFC_NFC_Text" , "$p2 TestQC_NFC_NFC_Text" ], + "QC_NFC_Orig_Text", ["$p1 TestQC_NFC_Orig_Text" , "$p2 TestQC_NFC_Orig_Text"], + "QC_NFD_NFD_Text", ["$p1 TestQC_NFD_NFD_Text" , "$p2 TestQC_NFD_NFD_Text" ], + "QC_NFD_NFC_Text", ["$p1 TestQC_NFD_NFC_Text" , "$p2 TestQC_NFD_NFC_Text" ], + "QC_NFD_Orig_Text", ["$p1 TestQC_NFD_Orig_Text" , "$p2 TestQC_NFD_Orig_Text"], + ## + "IsNormalized_NFC_NFD_Text", ["$p1 TestIsNormalized_NFC_NFD_Text" , "$p2 TestIsNormalized_NFC_NFD_Text" ], + "IsNormalized_NFC_NFC_Text", ["$p1 TestIsNormalized_NFC_NFC_Text" , "$p2 TestIsNormalized_NFC_NFC_Text" ], + "IsNormalized_NFC_Orig_Text", ["$p1 TestIsNormalized_NFC_Orig_Text" , "$p2 TestIsNormalized_NFC_Orig_Text"], + "IsNormalized_NFD_NFD_Text", ["$p1 TestIsNormalized_NFD_NFD_Text" , "$p2 TestIsNormalized_NFD_NFD_Text" ], + "IsNormalized_NFD_NFC_Text", ["$p1 TestIsNormalized_NFD_NFC_Text" , "$p2 TestIsNormalized_NFD_NFC_Text" ], + "IsNormalized_NFD_Orig_Text", ["$p1 TestIsNormalized_NFD_Orig_Text" , "$p2 TestIsNormalized_NFD_Orig_Text"] + }; + + +runTests($options, $tests, $dataFiles); + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp new file mode 100644 index 00000000000..011bbcbd3ec --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.cpp @@ -0,0 +1,505 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +/** + * This Program tests the performance of ICU's Normalization engine against Windows + * to run it use the command like + * + * c:\normperf.exe -s C:\work\ICUCupertinoRep\icu4c\collation-perf-data -i 10 -p 15 -f TestNames_Asian.txt -u -e UTF-8 -l + */ +#include "normperf.h" +#include "uoptions.h" +#include <stdio.h> + +#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0])) + +UPerfFunction* NormalizerPerformanceTest::runIndexedTest(int32_t index, UBool exec,const char* &name, char* par) { + switch (index) { + TESTCASE(0,TestICU_NFC_NFD_Text); + TESTCASE(1,TestICU_NFC_NFC_Text); + TESTCASE(2,TestICU_NFC_Orig_Text); + + TESTCASE(3,TestICU_NFD_NFD_Text); + TESTCASE(4,TestICU_NFD_NFC_Text); + TESTCASE(5,TestICU_NFD_Orig_Text); + + TESTCASE(6,TestICU_FCD_NFD_Text); + TESTCASE(7,TestICU_FCD_NFC_Text); + TESTCASE(8,TestICU_FCD_Orig_Text); + + TESTCASE(9,TestWin_NFC_NFD_Text); + TESTCASE(10,TestWin_NFC_NFC_Text); + TESTCASE(11,TestWin_NFC_Orig_Text); + + TESTCASE(12,TestWin_NFD_NFD_Text); + TESTCASE(13,TestWin_NFD_NFC_Text); + TESTCASE(14,TestWin_NFD_Orig_Text); + + TESTCASE(15,TestQC_NFC_NFD_Text); + TESTCASE(16,TestQC_NFC_NFC_Text); + TESTCASE(17,TestQC_NFC_Orig_Text); + + TESTCASE(18,TestQC_NFD_NFD_Text); + TESTCASE(19,TestQC_NFD_NFC_Text); + TESTCASE(20,TestQC_NFD_Orig_Text); + + TESTCASE(21,TestQC_FCD_NFD_Text); + TESTCASE(22,TestQC_FCD_NFC_Text); + TESTCASE(23,TestQC_FCD_Orig_Text); + + TESTCASE(24,TestIsNormalized_NFC_NFD_Text); + TESTCASE(25,TestIsNormalized_NFC_NFC_Text); + TESTCASE(26,TestIsNormalized_NFC_Orig_Text); + + TESTCASE(27,TestIsNormalized_NFD_NFD_Text); + TESTCASE(28,TestIsNormalized_NFD_NFC_Text); + TESTCASE(29,TestIsNormalized_NFD_Orig_Text); + + TESTCASE(30,TestIsNormalized_FCD_NFD_Text); + TESTCASE(31,TestIsNormalized_FCD_NFC_Text); + TESTCASE(32,TestIsNormalized_FCD_Orig_Text); + + default: + name = ""; + return NULL; + } + return NULL; + +} + +void NormalizerPerformanceTest::normalizeInput(ULine* dest,const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options){ + int32_t reqLen = 0; + UErrorCode status = U_ZERO_ERROR; + for(;;){ + /* pure pre-flight */ + reqLen=unorm_normalize(src,srcLen,mode, options,NULL,0,&status); + if(status==U_BUFFER_OVERFLOW_ERROR){ + status=U_ZERO_ERROR; + dest->name = new UChar[reqLen+1]; + reqLen= unorm_normalize(src,srcLen,mode, options,dest->name,reqLen+1,&status); + dest->len=reqLen; + break; + }else if(U_FAILURE(status)){ + printf("Could not normalize input. Error: %s", u_errorName(status)); + } + } +} +UChar* NormalizerPerformanceTest::normalizeInput(int32_t& len, const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options){ + int32_t reqLen = 0; + UErrorCode status = U_ZERO_ERROR; + UChar* dest = NULL; + for(;;){ + /* pure pre-flight */ + reqLen=unorm_normalize(src,srcLen,mode, options,NULL,0,&status); + if(status==U_BUFFER_OVERFLOW_ERROR){ + status=U_ZERO_ERROR; + dest = new UChar[reqLen+1]; + reqLen= unorm_normalize(src,srcLen,mode, options,dest,reqLen+1,&status); + len=reqLen; + break; + }else if(U_FAILURE(status)){ + printf("Could not normalize input. Error: %s", u_errorName(status)); + return NULL; + } + } + return dest; +} + +static UOption cmdLineOptions[]={ + UOPTION_DEF("options", 'o', UOPT_OPTIONAL_ARG) +}; + +NormalizerPerformanceTest::NormalizerPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status) +: UPerfTest(argc,argv,status), options(0) { + NFDBuffer = NULL; + NFCBuffer = NULL; + NFDBufferLen = 0; + NFCBufferLen = 0; + NFDFileLines = NULL; + NFCFileLines = NULL; + + if(status== U_ILLEGAL_ARGUMENT_ERROR){ + fprintf(stderr,gUsageString, "normperf"); + return; + } + + if(U_FAILURE(status)){ + fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", u_errorName(status)); + return; + } + + _remainingArgc = u_parseArgs(_remainingArgc, (char **)argv, (int32_t)(LENGTHOF(cmdLineOptions)), cmdLineOptions); + if(cmdLineOptions[0].doesOccur && cmdLineOptions[0].value!=NULL) { + options=(int32_t)strtol(cmdLineOptions[0].value, NULL, 16); + } + + if(line_mode){ + ULine* filelines = getLines(status); + if(U_FAILURE(status)){ + fprintf(stderr, "FAILED to read lines from file and create UPerfTest object. Error: %s\n", u_errorName(status)); + return; + } + NFDFileLines = new ULine[numLines]; + NFCFileLines = new ULine[numLines]; + + for(int32_t i=0;i<numLines;i++){ + normalizeInput(&NFDFileLines[i],filelines[i].name,filelines[i].len,UNORM_NFD, options); + normalizeInput(&NFCFileLines[i],filelines[i].name,filelines[i].len,UNORM_NFC, options); + + } + }else if(bulk_mode){ + int32_t srcLen = 0; + const UChar* src = getBuffer(srcLen,status); + NFDBufferLen = 0; + NFCBufferLen = 0; + + if(U_FAILURE(status)){ + fprintf(stderr, "FAILED to read buffer from file and create UPerfTest object. Error: %s\n", u_errorName(status)); + return; + } + + NFDBuffer = normalizeInput(NFDBufferLen,src,srcLen,UNORM_NFD, options); + NFCBuffer = normalizeInput(NFCBufferLen,src,srcLen,UNORM_NFC, options); + } + +} + +NormalizerPerformanceTest::~NormalizerPerformanceTest(){ + delete[] NFDFileLines; + delete[] NFCFileLines; + delete[] NFDBuffer; + delete[] NFCBuffer; +} + +// Test NFC Performance +UPerfFunction* NormalizerPerformanceTest::TestICU_NFC_NFD_Text(){ + if(line_mode){ + NormPerfFunction* func= new NormPerfFunction(ICUNormNFC, options,NFDFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func= new NormPerfFunction(ICUNormNFC, options,NFDBuffer, NFDBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestICU_NFC_NFC_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFC, options,NFCFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func= new NormPerfFunction(ICUNormNFC, options,NFCBuffer, NFCBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestICU_NFC_Orig_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFC, options,lines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFC, options,buffer, bufferLen, uselen); + return func; + } +} + +// Test NFD Performance +UPerfFunction* NormalizerPerformanceTest::TestICU_NFD_NFD_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFDFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFDBuffer,NFDBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestICU_NFD_NFC_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFCFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,NFCBuffer,NFCBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestICU_NFD_Orig_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,lines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormNFD, options,buffer,bufferLen, uselen); + return func; + } +} + +// Test FCD Performance +UPerfFunction* NormalizerPerformanceTest::TestICU_FCD_NFD_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFDFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFDBuffer,NFDBufferLen, uselen); + return func; + } + +} +UPerfFunction* NormalizerPerformanceTest::TestICU_FCD_NFC_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFCFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,NFCBuffer,NFCBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestICU_FCD_Orig_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,lines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(ICUNormFCD, options,buffer,bufferLen, uselen); + return func; + } +} + +// Test Win NFC Performance +UPerfFunction* NormalizerPerformanceTest::TestWin_NFC_NFD_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFDFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFDBuffer,NFDBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestWin_NFC_NFC_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFCFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,NFCBuffer,NFCBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestWin_NFC_Orig_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,lines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(WinNormNFC, options,buffer,bufferLen, uselen); + return func; + } +} + +// Test Win NFD Performance +UPerfFunction* NormalizerPerformanceTest::TestWin_NFD_NFD_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFDFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFDBuffer,NFDBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestWin_NFD_NFC_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFCFileLines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,NFCBuffer,NFCBufferLen, uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestWin_NFD_Orig_Text(){ + if(line_mode){ + NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,lines,numLines, uselen); + return func; + }else{ + NormPerfFunction* func = new NormPerfFunction(WinNormNFD, options,buffer,bufferLen, uselen); + return func; + } +} + +// Test Quick Check Performance +UPerfFunction* NormalizerPerformanceTest::TestQC_NFC_NFD_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDFileLines, numLines, UNORM_NFC, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDBuffer, NFDBufferLen, UNORM_NFC, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestQC_NFC_NFC_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCFileLines, numLines, UNORM_NFC, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCBuffer, NFCBufferLen, UNORM_NFC, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestQC_NFC_Orig_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,lines, numLines, UNORM_NFC, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,buffer, bufferLen, UNORM_NFC, options,uselen); + return func; + } +} + +UPerfFunction* NormalizerPerformanceTest::TestQC_NFD_NFD_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDFileLines, numLines, UNORM_NFD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDBuffer, NFDBufferLen, UNORM_NFD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestQC_NFD_NFC_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCFileLines, numLines, UNORM_NFD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCBuffer, NFCBufferLen, UNORM_NFD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestQC_NFD_Orig_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,lines, numLines, UNORM_NFD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,buffer, bufferLen, UNORM_NFD, options,uselen); + return func; + } +} + +UPerfFunction* NormalizerPerformanceTest::TestQC_FCD_NFD_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDFileLines, numLines, UNORM_FCD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFDBuffer, NFDBufferLen, UNORM_FCD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestQC_FCD_NFC_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCFileLines, numLines, UNORM_FCD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,NFCBuffer, NFCBufferLen, UNORM_FCD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestQC_FCD_Orig_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,lines, numLines, UNORM_FCD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUQuickCheck,buffer, bufferLen, UNORM_FCD, options,uselen); + return func; + } +} + +// Test isNormalized Performance +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFC_NFD_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDFileLines, numLines, UNORM_NFC, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDBuffer, NFDBufferLen, UNORM_NFC, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFC_NFC_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCFileLines, numLines, UNORM_NFC, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCBuffer, NFCBufferLen, UNORM_NFC, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFC_Orig_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,lines, numLines, UNORM_NFC, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,buffer, bufferLen, UNORM_NFC, options,uselen); + return func; + } +} + +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFD_NFD_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDFileLines, numLines, UNORM_NFD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDBuffer, NFDBufferLen, UNORM_NFD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFD_NFC_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCFileLines, numLines, UNORM_NFD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCBuffer, NFCBufferLen, UNORM_NFD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_NFD_Orig_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,lines, numLines, UNORM_NFD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,buffer, bufferLen, UNORM_NFD, options,uselen); + return func; + } +} + +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_FCD_NFD_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDFileLines, numLines, UNORM_FCD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFDBuffer, NFDBufferLen, UNORM_FCD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_FCD_NFC_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCFileLines, numLines, UNORM_FCD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,NFCBuffer, NFCBufferLen, UNORM_FCD, options,uselen); + return func; + } +} +UPerfFunction* NormalizerPerformanceTest::TestIsNormalized_FCD_Orig_Text(){ + if(line_mode){ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,lines, numLines, UNORM_FCD, options,uselen); + return func; + }else{ + QuickCheckPerfFunction* func = new QuickCheckPerfFunction(ICUIsNormalized,buffer, bufferLen, UNORM_FCD, options,uselen); + return func; + } +} + +int main(int argc, const char* argv[]){ + UErrorCode status = U_ZERO_ERROR; + NormalizerPerformanceTest test(argc, argv, status); + if(U_FAILURE(status)){ + return status; + } + if(test.run()==FALSE){ + fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n"); + return -1; + } + return 0; +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h new file mode 100644 index 00000000000..6a43a7727be --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.h @@ -0,0 +1,353 @@ +/* +********************************************************************** +* Copyright (c) 2002-2006, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +#ifndef _NORMPERF_H +#define _NORMPERF_H + +#include "unicode/unorm.h" +#include "unicode/ustring.h" + +#include "unicode/uperf.h" +#include <stdlib.h> + +// Stubs for Windows API functions when building on UNIXes. +// +#if defined(U_WINDOWS) +// do nothing +#else +#define _UNICODE +typedef int DWORD; +inline int FoldStringW(DWORD dwMapFlags, const UChar* lpSrcStr,int cchSrc, UChar* lpDestStr,int cchDest); +#endif + +#define DEST_BUFFER_CAPACITY 6000 +typedef int32_t (*NormFn)(const UChar* src,int32_t srcLen, UChar* dest,int32_t dstLen, int32_t options, UErrorCode* status); +typedef int32_t (*QuickCheckFn)(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status); + +class QuickCheckPerfFunction : public UPerfFunction{ +private: + ULine* lines; + int32_t numLines; + QuickCheckFn fn; + UNormalizationMode mode; + int32_t retVal; + UBool uselen; + const UChar* src; + int32_t srcLen; + UBool line_mode; + int32_t options; + +public: + virtual void call(UErrorCode* status){ + if(line_mode==TRUE){ + if(uselen){ + for(int32_t i = 0; i< numLines; i++){ + retVal = (*fn)(lines[i].name,lines[i].len,mode, options, status); + } + }else{ + for(int32_t i = 0; i< numLines; i++){ + retVal = (*fn)(lines[i].name,-1,mode, options, status); + } + } + }else{ + if(uselen){ + + retVal = (*fn)(src,srcLen,mode, options, status); + }else{ + retVal = (*fn)(src,-1,mode, options, status); + } + } + + } + virtual long getOperationsPerIteration(){ + if(line_mode==TRUE){ + int32_t totalChars=0; + for(int32_t i =0; i< numLines; i++){ + totalChars+= lines[i].len; + } + return totalChars; + }else{ + return srcLen; + } + } + QuickCheckPerfFunction(QuickCheckFn func, ULine* srcLines,int32_t srcNumLines, UNormalizationMode _mode, int32_t opts, UBool _uselen) : options(opts) { + fn = func; + lines = srcLines; + numLines = srcNumLines; + uselen = _uselen; + mode = _mode; + src = NULL; + srcLen = 0; + line_mode = TRUE; + } + QuickCheckPerfFunction(QuickCheckFn func, const UChar* source,int32_t sourceLen, UNormalizationMode _mode, int32_t opts, UBool _uselen) : options(opts) { + fn = func; + lines = NULL; + numLines = 0; + uselen = _uselen; + mode = _mode; + src = source; + srcLen = sourceLen; + line_mode = FALSE; + } +}; + + +class NormPerfFunction : public UPerfFunction{ +private: + ULine* lines; + int32_t numLines; + UChar dest[DEST_BUFFER_CAPACITY]; + UChar* pDest; + int32_t destLen; + NormFn fn; + int32_t retVal; + UBool uselen; + const UChar* src; + int32_t srcLen; + UBool line_mode; + int32_t options; + +public: + virtual void call(UErrorCode* status){ + if(line_mode==TRUE){ + if(uselen){ + for(int32_t i = 0; i< numLines; i++){ + retVal = (*fn)(lines[i].name,lines[i].len,pDest,destLen, options, status); + } + }else{ + for(int32_t i = 0; i< numLines; i++){ + retVal = (*fn)(lines[i].name,-1,pDest,destLen, options, status); + } + } + }else{ + if(uselen){ + retVal = (*fn)(src,srcLen,pDest,destLen, options, status); + }else{ + retVal = (*fn)(src,-1,pDest,destLen, options, status); + } + } + } + virtual long getOperationsPerIteration(){ + if(line_mode ==TRUE){ + int32_t totalChars=0; + for(int32_t i =0; i< numLines; i++){ + totalChars+= lines[i].len; + } + return totalChars; + }else{ + return srcLen; + } + } + NormPerfFunction(NormFn func, int32_t opts, ULine* srcLines,int32_t srcNumLines,UBool _uselen) : options(opts) { + fn = func; + lines = srcLines; + numLines = srcNumLines; + uselen = _uselen; + destLen = DEST_BUFFER_CAPACITY; + pDest = dest; + src = NULL; + srcLen = 0; + line_mode = TRUE; + } + NormPerfFunction(NormFn func, int32_t opts, const UChar* source,int32_t sourceLen,UBool _uselen) : options(opts) { + fn = func; + lines = NULL; + numLines = 0; + uselen = _uselen; + destLen = sourceLen*3; + pDest = (UChar*) malloc(destLen * U_SIZEOF_UCHAR); + src = source; + srcLen = sourceLen; + line_mode = FALSE; + } + ~NormPerfFunction(){ + if(dest != pDest){ + free(pDest); + } + } +}; + + + +class NormalizerPerformanceTest : public UPerfTest{ +private: + ULine* NFDFileLines; + ULine* NFCFileLines; + UChar* NFDBuffer; + UChar* NFCBuffer; + UChar* origBuffer; + int32_t origBufferLen; + int32_t NFDBufferLen; + int32_t NFCBufferLen; + int32_t options; + + void normalizeInput(ULine* dest,const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options); + UChar* normalizeInput(int32_t& len, const UChar* src ,int32_t srcLen,UNormalizationMode mode, int32_t options); + +public: + + NormalizerPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status); + ~NormalizerPerformanceTest(); + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,const char* &name, char* par = NULL); + /* NFC performance */ + UPerfFunction* TestICU_NFC_NFD_Text(); + UPerfFunction* TestICU_NFC_NFC_Text(); + UPerfFunction* TestICU_NFC_Orig_Text(); + + /* NFD performance */ + UPerfFunction* TestICU_NFD_NFD_Text(); + UPerfFunction* TestICU_NFD_NFC_Text(); + UPerfFunction* TestICU_NFD_Orig_Text(); + + /* FCD performance */ + UPerfFunction* TestICU_FCD_NFD_Text(); + UPerfFunction* TestICU_FCD_NFC_Text(); + UPerfFunction* TestICU_FCD_Orig_Text(); + + /*Win NFC performance */ + UPerfFunction* TestWin_NFC_NFD_Text(); + UPerfFunction* TestWin_NFC_NFC_Text(); + UPerfFunction* TestWin_NFC_Orig_Text(); + + /* Win NFD performance */ + UPerfFunction* TestWin_NFD_NFD_Text(); + UPerfFunction* TestWin_NFD_NFC_Text(); + UPerfFunction* TestWin_NFD_Orig_Text(); + + /* Quick check performance */ + UPerfFunction* TestQC_NFC_NFD_Text(); + UPerfFunction* TestQC_NFC_NFC_Text(); + UPerfFunction* TestQC_NFC_Orig_Text(); + + UPerfFunction* TestQC_NFD_NFD_Text(); + UPerfFunction* TestQC_NFD_NFC_Text(); + UPerfFunction* TestQC_NFD_Orig_Text(); + + UPerfFunction* TestQC_FCD_NFD_Text(); + UPerfFunction* TestQC_FCD_NFC_Text(); + UPerfFunction* TestQC_FCD_Orig_Text(); + + /* IsNormalized performnace */ + UPerfFunction* TestIsNormalized_NFC_NFD_Text(); + UPerfFunction* TestIsNormalized_NFC_NFC_Text(); + UPerfFunction* TestIsNormalized_NFC_Orig_Text(); + + UPerfFunction* TestIsNormalized_NFD_NFD_Text(); + UPerfFunction* TestIsNormalized_NFD_NFC_Text(); + UPerfFunction* TestIsNormalized_NFD_Orig_Text(); + + UPerfFunction* TestIsNormalized_FCD_NFD_Text(); + UPerfFunction* TestIsNormalized_FCD_NFC_Text(); + UPerfFunction* TestIsNormalized_FCD_Orig_Text(); + +}; + +//--------------------------------------------------------------------------------------- +// Platform / ICU version specific proto-types +//--------------------------------------------------------------------------------------- + + +#if (U_ICU_VERSION_MAJOR_NUM > 1 ) || ((U_ICU_VERSION_MAJOR_NUM == 1 )&&(U_ICU_VERSION_MINOR_NUM > 8) && (U_ICU_VERSION_PATCHLEVEL_NUM >=1)) + +int32_t ICUNormNFD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UNORM_NFD, options,dest,dstLen,status); +} + +int32_t ICUNormNFC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UNORM_NFC, options,dest,dstLen,status); +} + +int32_t ICUNormNFKD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UNORM_NFKD, options,dest,dstLen,status); +} +int32_t ICUNormNFKC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UNORM_NFKC, options,dest,dstLen,status); +} + +int32_t ICUNormFCD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UNORM_FCD, options,dest,dstLen,status); +} + +int32_t ICUQuickCheck(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){ +#if (U_ICU_VERSION_MAJOR_NUM > 2 ) || ((U_ICU_VERSION_MAJOR_NUM == 2 )&&(U_ICU_VERSION_MINOR_NUM >= 6)) + return unorm_quickCheckWithOptions(src,srcLen,mode, options, status); +#else + return unorm_quickCheck(src,srcLen,mode,status); +#endif +} +int32_t ICUIsNormalized(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){ + return unorm_isNormalized(src,srcLen,mode,status); +} + + +#else + +int32_t ICUNormNFD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UCOL_DECOMP_CAN, options,dest,dstLen,status); +} + +int32_t ICUNormNFC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UCOL_COMPOSE_CAN, options,dest,dstLen,status); +} + +int32_t ICUNormNFKD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UCOL_DECOMP_COMPAT, options,dest,dstLen,status); +} +int32_t ICUNormNFKC(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UCOL_COMPOSE_COMPAT, options,dest,dstLen,status); +} + +int32_t ICUNormFCD(const UChar* src, int32_t srcLen,UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return unorm_normalize(src,srcLen,UNORM_FCD, options,dest,dstLen,status); +} + +int32_t ICUQuickCheck(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){ + return unorm_quickCheck(src,srcLen,mode,status); +} + +int32_t ICUIsNormalized(const UChar* src,int32_t srcLen, UNormalizationMode mode, int32_t options, UErrorCode* status){ + return 0; +} +#endif + +#if defined(U_WINDOWS) + +int32_t WinNormNFD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return FoldStringW(MAP_COMPOSITE,src,srcLen,dest,dstLen); +} + +int32_t WinNormNFC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return FoldStringW(MAP_PRECOMPOSED,src,srcLen,dest,dstLen); +} + +int32_t WinNormNFKD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return FoldStringW(MAP_COMPOSITE+MAP_FOLDCZONE,src,srcLen,dest,dstLen); +} +int32_t WinNormNFKC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return FoldStringW(MAP_FOLDCZONE,src,srcLen,dest,dstLen); +} +#else +int32_t WinNormNFD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return 0 ; +} + +int32_t WinNormNFC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return 0; +} + +int32_t WinNormNFKD(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return 0; +} +int32_t WinNormNFKC(const UChar* src, int32_t srcLen, UChar* dest, int32_t dstLen, int32_t options, UErrorCode* status) { + return 0; +} +#endif + + +#endif // NORMPERF_H + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj new file mode 100644 index 00000000000..b2151a3b9b3 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/normperf/normperf.vcproj @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="normperf" + ProjectGUID="{56CCC661-8D33-4F0A-B62F-C619CE843C68}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/normperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MBCS" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Debug/normperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib" + OutputFile=".\Debug/normperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/normperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/normperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Release/normperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + OutputFile=".\Release/normperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/normperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="normperf.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_MBCS;_UNICODE;$(NoInherit)" + BasicRuntimeChecks="3" + BrowseInformation="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="normperf.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perf.sln b/Build/source/libs/icu/icu-xetex/test/perf/perf.sln new file mode 100644 index 00000000000..49312f49d91 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/perf.sln @@ -0,0 +1,61 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "charperf", "charperf\charperf.vcproj", "{D850A4B6-7D94-476E-9392-E9272DA4EAAF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "normperf", "normperf\normperf.vcproj", "{56CCC661-8D33-4F0A-B62F-C619CE843C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convperf", "convperf\convperf.vcproj", "{B4C03939-D417-41F0-85B4-848ECF105E3A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stringperf", "ustrperf\stringperf.vcproj", "{523710EA-349D-45BF-8B39-289CC86E7D91}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubrkperf", "ubrkperf\ubrkperf.vcproj", "{7E280294-49BD-43D1-9903-CF29648D88CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utfperf", "utfperf\utfperf.vcproj", "{E7728E98-0469-43F4-AF37-4529A3D52C6B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "collperf", "collperf\collperf.vcproj", "{01807B4A-E3B5-4B97-A7F3-207746DCD71E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usetperf", "usetperf\usetperf.vcproj", "{EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Debug|Win32.ActiveCfg = Debug|Win32 + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Debug|Win32.Build.0 = Debug|Win32 + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Release|Win32.ActiveCfg = Release|Win32 + {D850A4B6-7D94-476E-9392-E9272DA4EAAF}.Release|Win32.Build.0 = Release|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Debug|Win32.Build.0 = Debug|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Release|Win32.ActiveCfg = Release|Win32 + {56CCC661-8D33-4F0A-B62F-C619CE843C68}.Release|Win32.Build.0 = Release|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Debug|Win32.Build.0 = Debug|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Release|Win32.ActiveCfg = Release|Win32 + {B4C03939-D417-41F0-85B4-848ECF105E3A}.Release|Win32.Build.0 = Release|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Debug|Win32.ActiveCfg = Debug|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Debug|Win32.Build.0 = Debug|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Release|Win32.ActiveCfg = Release|Win32 + {523710EA-349D-45BF-8B39-289CC86E7D91}.Release|Win32.Build.0 = Release|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Debug|Win32.Build.0 = Debug|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Release|Win32.ActiveCfg = Release|Win32 + {7E280294-49BD-43D1-9903-CF29648D88CA}.Release|Win32.Build.0 = Release|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Debug|Win32.ActiveCfg = Debug|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Debug|Win32.Build.0 = Debug|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Release|Win32.ActiveCfg = Release|Win32 + {E7728E98-0469-43F4-AF37-4529A3D52C6B}.Release|Win32.Build.0 = Release|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Debug|Win32.ActiveCfg = Debug|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Debug|Win32.Build.0 = Debug|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Release|Win32.ActiveCfg = Release|Win32 + {01807B4A-E3B5-4B97-A7F3-207746DCD71E}.Release|Win32.Build.0 = Release|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Debug|Win32.ActiveCfg = Debug|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Debug|Win32.Build.0 = Debug|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Release|Win32.ActiveCfg = Release|Win32 + {EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm new file mode 100644 index 00000000000..ab5d05bbb4e --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Dataset.pm @@ -0,0 +1,139 @@ +#!/usr/local/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +package Dataset; +use Statistics::Descriptive; +use Statistics::Distributions; +use strict; + +# Create a new Dataset with the given data. +sub new { + my ($class) = shift; + my $self = bless { + _data => \@_, + _scale => 1.0, + _mean => 0.0, + _error => 0.0, + }, $class; + + my $n = @_; + + if ($n >= 1) { + my $stats = Statistics::Descriptive::Full->new(); + $stats->add_data(@{$self->{_data}}); + $self->{_mean} = $stats->mean(); + + if ($n >= 2) { + # Use a t distribution rather than Gaussian because (a) we + # assume an underlying normal dist, (b) we do not know the + # standard deviation -- we estimate it from the data, and (c) + # we MAY have a small sample size (also works for large n). + my $t = Statistics::Distributions::tdistr($n-1, 0.005); + $self->{_error} = $t * $stats->standard_deviation(); + } + } + + $self; +} + +# Set a scaling factor for all data; 1.0 means no scaling. +# Scale must be > 0. +sub setScale { + my ($self, $scale) = @_; + $self->{_scale} = $scale; +} + +# Multiply the scaling factor by a value. +sub scaleBy { + my ($self, $a) = @_; + $self->{_scale} *= $a; +} + +# Return the mean. +sub getMean { + my $self = shift; + return $self->{_mean} * $self->{_scale}; +} + +# Return a 99% error based on the t distribution. The dataset +# is desribed as getMean() +/- getError(). +sub getError { + my $self = shift; + return $self->{_error} * $self->{_scale}; +} + +# Divide two Datasets and return a new one, maintaining the +# mean+/-error. The new Dataset has no data points. +sub divide { + my $self = shift; + my $rhs = shift; + + my $minratio = ($self->{_mean} - $self->{_error}) / + ($rhs->{_mean} + $rhs->{_error}); + my $maxratio = ($self->{_mean} + $self->{_error}) / + ($rhs->{_mean} - $rhs->{_error}); + + my $result = Dataset->new(); + $result->{_mean} = ($minratio + $maxratio) / 2; + $result->{_error} = $result->{_mean} - $minratio; + $result->{_scale} = $self->{_scale} / $rhs->{_scale}; + $result; +} + +# subtracts two Datasets and return a new one, maintaining the +# mean+/-error. The new Dataset has no data points. +sub subtract { + my $self = shift; + my $rhs = shift; + + my $result = Dataset->new(); + $result->{_mean} = $self->{_mean} - $rhs->{_mean}; + $result->{_error} = $self->{_error} + $rhs->{_error}; + $result->{_scale} = $self->{_scale}; + $result; +} + +# adds two Datasets and return a new one, maintaining the +# mean+/-error. The new Dataset has no data points. +sub add { + my $self = shift; + my $rhs = shift; + + my $result = Dataset->new(); + $result->{_mean} = $self->{_mean} + $rhs->{_mean}; + $result->{_error} = $self->{_error} + $rhs->{_error}; + $result->{_scale} = $self->{_scale}; + $result; +} + +# Divides a dataset by a scalar. +# The new Dataset has no data points. +sub divideByScalar { + my $self = shift; + my $s = shift; + + my $result = Dataset->new(); + $result->{_mean} = $self->{_mean}/$s; + $result->{_error} = $self->{_error}/$s; + $result->{_scale} = $self->{_scale}; + $result; +} + +# Divides a dataset by a scalar. +# The new Dataset has no data points. +sub multiplyByScalar { + my $self = shift; + my $s = shift; + + my $result = Dataset->new(); + $result->{_mean} = $self->{_mean}*$s; + $result->{_error} = $self->{_error}*$s; + $result->{_scale} = $self->{_scale}; + $result; +} + +1; diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm new file mode 100644 index 00000000000..d12fd18ad25 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Format.pm @@ -0,0 +1,166 @@ +#!/usr/local/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +my $PLUS_MINUS = "±"; + +#|#--------------------------------------------------------------------- +#|# Format a confidence interval, as given by a Dataset. Output is as +#|# as follows: +#|# 241.23 - 241.98 => 241.5 +/- 0.3 +#|# 241.2 - 243.8 => 242 +/- 1 +#|# 211.0 - 241.0 => 226 +/- 15 or? 230 +/- 20 +#|# 220.3 - 234.3 => 227 +/- 7 +#|# 220.3 - 300.3 => 260 +/- 40 +#|# 220.3 - 1000 => 610 +/- 390 or? 600 +/- 400 +#|# 0.022 - 0.024 => 0.023 +/- 0.001 +#|# 0.022 - 0.032 => 0.027 +/- 0.005 +#|# 0.022 - 1.000 => 0.5 +/- 0.5 +#|# In other words, take one significant digit of the error value and +#|# display the mean to the same precision. +#|sub formatDataset { +#| my $ds = shift; +#| my $lower = $ds->getMean() - $ds->getError(); +#| my $upper = $ds->getMean() + $ds->getError(); +#| my $scale = 0; +#| # Find how many initial digits are the same +#| while ($lower < 1 || +#| int($lower) == int($upper)) { +#| $lower *= 10; +#| $upper *= 10; +#| $scale++; +#| } +#| while ($lower >= 10 && +#| int($lower) == int($upper)) { +#| $lower /= 10; +#| $upper /= 10; +#| $scale--; +#| } +#|} + +#--------------------------------------------------------------------- +# Format a number, optionally with a +/- delta, to n significant +# digits. +# +# @param significant digit, a value >= 1 +# @param multiplier +# @param time in seconds to be formatted +# @optional delta in seconds +# +# @return string of the form "23" or "23 +/- 10". +# +sub formatNumber { + my $sigdig = shift; + my $mult = shift; + my $a = shift; + my $delta = shift; # may be undef + + my $result = formatSigDig($sigdig, $a*$mult); + if (defined($delta)) { + my $d = formatSigDig($sigdig, $delta*$mult); + # restrict PRECISION of delta to that of main number + if ($result =~ /\.(\d+)/) { + # TODO make this work for values with all significant + # digits to the left of the decimal, e.g., 1234000. + + # TODO the other thing wrong with this is that it + # isn't rounding the $delta properly. Have to put + # this logic into formatSigDig(). + my $x = length($1); + $d =~ s/\.(\d{$x})\d+/.$1/; + } + $result .= " $PLUS_MINUS " . $d; + } + $result; +} + +#--------------------------------------------------------------------- +# Format a time, optionally with a +/- delta, to n significant +# digits. +# +# @param significant digit, a value >= 1 +# @param time in seconds to be formatted +# @optional delta in seconds +# +# @return string of the form "23 ms" or "23 +/- 10 ms". +# +sub formatSeconds { + my $sigdig = shift; + my $a = shift; + my $delta = shift; # may be undef + + my @MULT = (1 , 1e3, 1e6, 1e9); + my @SUFF = ('s' , 'ms', 'us', 'ns'); + + # Determine our scale + my $i = 0; + #always do seconds if the following line is commented out + ++$i while ($a*$MULT[$i] < 1 && $i < @MULT); + + formatNumber($sigdig, $MULT[$i], $a, $delta) . ' ' . $SUFF[$i]; +} + +#--------------------------------------------------------------------- +# Format a percentage, optionally with a +/- delta, to n significant +# digits. +# +# @param significant digit, a value >= 1 +# @param value to be formatted, as a fraction, e.g. 0.5 for 50% +# @optional delta, as a fraction +# +# @return string of the form "23 %" or "23 +/- 10 %". +# +sub formatPercent { + my $sigdig = shift; + my $a = shift; + my $delta = shift; # may be undef + + formatNumber($sigdig, 100, $a, $delta) . '%'; +} + +#--------------------------------------------------------------------- +# Format a number to n significant digits without using exponential +# notation. +# +# @param significant digit, a value >= 1 +# @param number to be formatted +# +# @return string of the form "1234" "12.34" or "0.001234". If +# number was negative, prefixed by '-'. +# +sub formatSigDig { + my $n = shift() - 1; + my $a = shift; + + local $_ = sprintf("%.${n}e", $a); + my $sign = (s/^-//) ? '-' : ''; + + my $a_e; + my $result; + if (/^(\d)\.(\d+)e([-+]\d+)$/) { + my ($d, $dn, $e) = ($1, $2, $3); + $a_e = $e; + $d .= $dn; + $e++; + $d .= '0' while ($e > length($d)); + while ($e < 1) { + $e++; + $d = '0' . $d; + } + if ($e == length($d)) { + $result = $sign . $d; + } else { + $result = $sign . substr($d, 0, $e) . '.' . substr($d, $e); + } + } else { + die "Can't parse $_"; + } + $result; +} + +1; + +#eof diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm new file mode 100644 index 00000000000..7b67a9c337b --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/Output.pm @@ -0,0 +1,389 @@ +#!/usr/local/bin/perl + +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + + +use strict; + +use Dataset; + +my $TABLEATTR = 'BORDER="1" CELLPADDING="4" CELLSPACING="0"'; +my $outType = "HTML"; +my $html = "noName"; +my $inTable; +my @headers; +my @timetypes = ("mean per op", "error per op", "events", "per event"); +my %raw; +my $current = ""; +my $exp = 0; +my $mult = 1e9; #use nanoseconds +my $perc = 100; #for percent +my $printEvents = 0; +my $legend = "<a name=\"Legend\">\n<h2>Table legend</h2></a><ul>"; +my $legendDone = 0; +my %options; +my $operationIs = "operation"; +my $eventIs = "event"; + +sub startTest { + $current = shift; + $exp = 0; + outputData($current); +} + +sub printLeg { + if(!$legendDone) { + my $message; + foreach $message (@_) { + $legend .= "<li>".$message."</li>\n"; + } + } +} + +sub outputDist { + my $value = shift; + my $percent = shift; + my $mean = $value->getMean; + my $error = $value->getError; + print HTML "<td class=\""; + if($mean > 0) { + print HTML "value"; + } else { + print HTML "worse"; + } + print HTML "\">"; + if($percent) { + print HTML formatPercent(2, $mean); + } else { + print HTML formatNumber(2, $mult, $mean); + } + print HTML "</td>\n"; + print HTML "<td class=\""; + if((($error*$mult < 10)&&!$percent) || (($error<10)&&$percent)) { + print HTML "error"; + } else { + print HTML "errorLarge"; + } + print HTML "\">±"; + if($percent) { + print HTML formatPercent(2, $error); + } else { + print HTML formatNumber(2, $mult, $error); + } + print HTML "</td>\n"; +} + +sub outputValue { + my $value = shift; + print HTML "<td class=\"sepvalue\">"; + print HTML $value; + #print HTML formatNumber(2, 1, $value); + print HTML "</td>\n"; +} + +sub startTable { + #my $printEvents = shift; + $inTable = 1; + my $i; + print HTML "<table $TABLEATTR>\n"; + print HTML "<tbody>\n"; + if($#headers >= 0) { + my ($header, $i); + print HTML "<tr>\n"; + print HTML "<th rowspan=\"2\" class=\"testNameHeader\"><a href=\"#TestName\">Test Name</a></th>\n"; + print HTML "<th rowspan=\"2\" class=\"testNameHeader\"><a href=\"#Ops\">Ops</a></th>\n"; + printLeg("<a name=\"Test Name\">TestName</a> - name of the test as set by the test writer\n", "<a name=\"Ops\">Ops</a> - number of ".$operationIs."s per iteration\n"); + if(!$printEvents) { + print HTML "<th colspan=".((4*($#headers+1))-2)." class=\"sourceType\">Per Operation</th>\n"; + } else { + print HTML "<th colspan=".((2*($#headers+1))-2)." class=\"sourceType\">Per Operation</th>\n"; + print HTML "<th colspan=".((5*($#headers+1))-2)." class=\"sourceType\">Per Event</th>\n"; + } + print HTML "</tr>\n<tr>\n"; + if(!$printEvents) { + foreach $header (@headers) { + print HTML "<th class=\"source\" colspan=2><a href=\"#meanop_$header\">$header<br>/op</a></th>\n"; + printLeg("<a name=\"meanop_$header\">$header /op</a> - mean time and error for $header per $operationIs"); + } + } + for $i (1 .. $#headers) { + print HTML "<th class=\"source\" colspan=2><a href=\"#mean_op_$i\">ratio $i<br>/op</a></th>\n"; + printLeg("<a name=\"mean_op_$i\">ratio $i /op</a> - ratio and error of per $operationIs time, calculated as: (($headers[0] - $headers[$i])/$headers[$i])*100%, mean value"); + } + if($printEvents) { + foreach $header (@headers) { + print HTML "<th class=\"source\"><a href=\"#events_$header\">$header<br>events</a></th>\n"; + printLeg("<a name=\"events_$header\">$header events</a> - number of ".$eventIs."s for $header per iteration"); + } + foreach $header (@headers) { + print HTML "<th class=\"source\" colspan=2><a href=\"#mean_ev_$header\">$header<br>/ev</a></th>\n"; + printLeg("<a name=\"mean_ev_$header\">$header /ev</a> - mean time and error for $header per $eventIs"); + } + for $i (1 .. $#headers) { + print HTML "<th class=\"source\" colspan=2><a href=\"#mean_ev_$i\">ratio $i<br>/ev</a></th>\n"; + printLeg("<a name=\"mean_ev_$i\">ratio $i /ev</a> - ratio and error of per $eventIs time, calculated as: (($headers[0] - $headers[$i])/$headers[$i])*100%, mean value"); + } + } + print HTML "</tr>\n"; + } + $legendDone = 1; +} + +sub closeTable { + if($inTable) { + undef $inTable; + print HTML "</tr>\n"; + print HTML "</tbody>"; + print HTML "</table>\n"; + } +} + +sub newRow { + if(!$inTable) { + startTable; + } else { + print HTML "</tr>\n"; + } + print HTML "<tr>"; +} + +sub outputData { + if($inTable) { + my $msg = shift; + my $align = shift; + print HTML "<td"; + if($align) { + print HTML " align = $align>"; + } else { + print HTML ">"; + } + print HTML "$msg"; + print HTML "</td>"; + } else { + my $message; + foreach $message (@_) { + print HTML "$message"; + } + } +} + +sub setupOutput { + my $date = localtime; + my $options = shift; + %options = %{ $options }; + my $title = $options{ "title" }; + my $headers = $options{ "headers" }; + if($options{ "operationIs" }) { + $operationIs = $options{ "operationIs" }; + } + if($options{ "eventIs" }) { + $eventIs = $options{ "eventIs" }; + } + @headers = split(/ /, $headers); + my ($t, $rest); + ($t, $rest) = split(/\.\w+/, $0); + $t =~ /^.*\W(\w+)$/; + $t = $1; + if($outType eq 'HTML') { + $html = $date; + $html =~ s/://g; # ':' illegal + $html =~ s/\s*\d+$//; # delete year + $html =~ s/^\w+\s*//; # delete dow + $html = "$t $html.html"; + if($options{ "outputDir" }) { + $html = $options{ "outputDir" }."/".$html; + } + $html =~ s/ /_/g; + + open(HTML,">$html") or die "Can't write to $html: $!"; + +#<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> + print HTML <<EOF; +<HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <TITLE>$title</TITLE> +<style> +<!-- +body { font-size: 10pt; font-family: sans-serif } +th { font-size: 10pt; border: 0 solid #000080; padding: 5 } +th.testNameHeader { border-width: 1 } +th.testName { text-align: left; border-left-width: 1; border-right-width: 1; + border-bottom-width: 1 } +th.source { border-right-width: 1; border-bottom-width: 1 } +th.sourceType { border-right-width: 1; border-top-width: 1; border-bottom-width: 1 } +td { font-size: 10pt; text-align: Right; border: 0 solid #000080; padding: 5 } +td.string { text-align: Left; border-bottom-width:1; border-right-width:1 } +td.sepvalue { border-bottom-width: 1; border-right-width: 1 } +td.value { border-bottom-width: 1 } +td.worse { color: #FF0000; font-weight: bold; border-bottom-width: 1 } +td.error { font-size: 75%; border-right-width: 1; border-bottom-width: 1 } +td.errorLarge { font-size: 75%; color: #FF0000; font-weight: bold; border-right-width: 1; + border-bottom-width: 1 } +A:link { color: black; font-weight: normal; text-decoration: none} /* unvisited links */ +A:visited { color: blue; font-weight: normal; text-decoration: none } /* visited links */ +A:hover { color: red; font-weight: normal; text-decoration: none } /* user hovers */ +A:active { color: lime; font-weight: normal; text-decoration: none } /* active links */ +--> +</style> + </HEAD> + <BODY bgcolor="#FFFFFF" LINK="#006666" VLINK="#000000"> +EOF + print HTML "<H1>$title</H1>\n"; + + #print HTML "<H2>$TESTCLASS</H2>\n"; + } +} + +sub closeOutput { + if($outType eq 'HTML') { + if($inTable) { + closeTable; + } + $legend .= "</ul>\n"; + print HTML $legend; + outputRaw(); + print HTML <<EOF; + </BODY> +</HTML> +EOF + close(HTML) or die "Can't close $html: $!"; + } +} + + +sub outputRaw { + print HTML "<h2>Raw data</h2>"; + my $key; + my $i; + my $j; + my $k; + print HTML "<table $TABLEATTR>\n"; + for $key (sort keys %raw) { + my $printkey = $key; + $printkey =~ s/\<br\>/ /g; + if($printEvents) { + if($key ne "") { + print HTML "<tr><th class=\"testNameHeader\" colspan = 7>$printkey</td></tr>\n"; # locale and data file + } + print HTML "<tr><th class=\"testName\">test name</th><th class=\"testName\">interesting arguments</th><th class=\"testName\">iterations</th><th class=\"testName\">operations</th><th class=\"testName\">mean time (ns)</th><th class=\"testName\">error (ns)</th><th class=\"testName\">events</th></tr>\n"; + } else { + if($key ne "") { + print HTML "<tr><th class=\"testName\" colspan = 6>$printkey</td></tr>\n"; # locale and data file + } + print HTML "<tr><th class=\"testName\">test name</th><th class=\"testName\">interesting arguments</th><th class=\"testName\">iterations</th><th class=\"testName\">operations</th><th class=\"testName\">mean time (ns)</th><th class=\"testName\">error (ns)</th></tr>\n"; + } + $printkey =~ s/[\<\>\/ ]//g; + + my %done; + for $i ( $raw{$key} ) { + print HTML "<tr>"; + for $j ( @$i ) { + my ($test, $args); + ($test, $args) = split(/,/, shift(@$j)); + + print HTML "<th class=\"testName\">"; + if(!$done{$test}) { + print HTML "<a name=\"".$printkey."_".$test."\">".$test."</a>"; + $done{$test} = 1; + } else { + print HTML $test; + } + print HTML "</th>"; + + print HTML "<td class=\"string\">".$args."</td>"; + + print HTML "<td class=\"sepvalue\">".shift(@$j)."</td>"; + print HTML "<td class=\"sepvalue\">".shift(@$j)."</td>"; + + my @data = @{ shift(@$j) }; + my $ds = Dataset->new(@data); + print HTML "<td class=\"sepvalue\">".formatNumber(4, $mult, $ds->getMean)."</td><td class=\"sepvalue\">".formatNumber(4, $mult, $ds->getError)."</td>"; + if($#{ $j } >= 0) { + print HTML "<td class=\"sepvalue\">".shift(@$j)."</td>"; + } + print HTML "</tr>\n"; + } + } + } +} + +sub store { + $raw{$current}[$exp++] = [@_]; +} + +sub outputRow { + #$raw{$current}[$exp++] = [@_]; + my $testName = shift; + my @iterPerPass = @{shift(@_)}; + my @noopers = @{shift(@_)}; + my @timedata = @{shift(@_)}; + my @noevents; + if($#_ >= 0) { + @noevents = @{shift(@_)}; + } + if(!$inTable) { + if(@noevents) { + $printEvents = 1; + startTable; + } else { + startTable; + } + } + debug("No events: @noevents, $#noevents\n"); + + my $j; + my $loc = $current; + $loc =~ s/\<br\>/ /g; + $loc =~ s/[\<\>\/ ]//g; + + # Finished one row of results. Outputting + newRow; + #outputData($testName, "LEFT"); + print HTML "<th class=\"testName\"><a href=\"#".$loc."_".$testName."\">$testName</a></th>\n"; + #outputData($iterCount); + #outputData($noopers[0], "RIGHT"); + outputValue($noopers[0]); + + if(!$printEvents) { + for $j ( 0 .. $#timedata ) { + my $perOperation = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noopers[$j]); # time per operation + #debug("Time per operation: ".formatSeconds(4, $perOperation->getMean, $perOperation->getError)."\n"); + outputDist($perOperation); + } + } + my $baseLinePO = $timedata[0]->divideByScalar($iterPerPass[0]*$noopers[0]); + for $j ( 1 .. $#timedata ) { + my $perOperation = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noopers[$j]); # time per operation + my $ratio = $baseLinePO->subtract($perOperation); + $ratio = $ratio->divide($perOperation); + outputDist($ratio, "%"); + } + if (@noevents) { + for $j ( 0 .. $#timedata ) { + #outputData($noevents[$j], "RIGHT"); + outputValue($noevents[$j]); + } + for $j ( 0 .. $#timedata ) { + my $perEvent = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noevents[$j]); # time per event + #debug("Time per operation: ".formatSeconds(4, $perEvent->getMean, $perEvent->getError)."\n"); + outputDist($perEvent); + } + my $baseLinePO = $timedata[0]->divideByScalar($iterPerPass[0]*$noevents[0]); + for $j ( 1 .. $#timedata ) { + my $perOperation = $timedata[$j]->divideByScalar($iterPerPass[$j]*$noevents[$j]); # time per operation + my $ratio = $baseLinePO->subtract($perOperation); + $ratio = $ratio->divide($perOperation); + outputDist($ratio, "%"); + } + } +} + + +1; + +#eof diff --git a/Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm new file mode 100644 index 00000000000..04d96a2b655 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/perldriver/PerfFramework.pm @@ -0,0 +1,391 @@ +#!/usr/local/bin/perl +# *********************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2004, International Business Machines Corporation +# * and others. All Rights Reserved. +# *********************************************************************** + +use strict; + +#use Dataset; +use Format; +use Output; + +my $VERBOSE = 0; +my $DEBUG = 1; +my $start_l = ""; #formatting help +my $end_l = ""; +my @testArgs; # different kinds of tests we want to do +my $datadir = "data"; +my $extraArgs; # stuff that always gets passed to the test program + + +my $iterCount = 0; +my $NUMPASSES = 4; +my $TIME = 2; +my $ITERATIONS; #Added by Doug +my $DATADIR; + +sub setupOptions { + my %options = %{shift @_}; + + if($options{"time"}) { + $TIME = $options{"time"}; + } + + if($options{"passes"}) { + $NUMPASSES = $options{"passes"}; + } + + if($options{"dataDir"}) { + $DATADIR = $options{"dataDir"}; + } + + # Added by Doug + if ($options{"iterations"}) { + $ITERATIONS = $options{"iterations"}; + } +} + +sub runTests { + my $options = shift; + my @programs; + my $tests = shift; + my %datafiles; + if($#_ >= 0) { # maybe no files/locales + my $datafiles = shift; + if($datafiles) { + %datafiles = %{$datafiles}; + } + } + setupOutput($options); + setupOptions($options); + + my($locale, $iter, $data, $program, $args, $variable); +# +# Outer loop runs through the locales to test +# + if (%datafiles) { + foreach $locale (sort keys %datafiles ) { + foreach $data (@{ $datafiles{$locale} }) { + closeTable; + my $locdata = ""; + if(!($locale eq "")) { + $locdata = "<b>Locale:</b> $locale<br>"; + } + $locdata .= "<b>Datafile:</b> $data<br>"; + startTest($locdata); + + if($DATADIR) { + compareLoop ($tests, $locale, $DATADIR."/".$data); + } else { + compareLoop ($tests, $locale, $data); + } + } + } + } else { + compareLoop($tests); + } + closeOutput(); +} + +sub compareLoop { + my $tests = shift; + #my @tests = @{$tests}; + my %tests = %{$tests}; + my $locale = shift; + my $datafile = shift; + my $locAndData = ""; + if($locale) { + $locAndData .= " -L $locale"; + } + if($datafile) { + $locAndData .= " -f $datafile"; + } + + my $args; + my ($i, $j, $aref); + foreach $i ( sort keys %tests ) { + debug("Test: $i\n"); + $aref = $tests{$i}; + my @timedata; + my @iterPerPass; + my @noopers; + my @noevents; + + my $program; + my @argsAndTest; + for $j ( 0 .. $#{$aref} ) { + # first we calibrate. Use time from somewhere + # first test is used for calibration + ($program, @argsAndTest) = split(/\ /, @{ $tests{$i} }[$j]); + #Modified by Doug + my $commandLine; + if ($ITERATIONS) { + $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest"; + } else { + $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest"; + } + #my $commandLine = "$program -i 5 -p $NUMPASSES $locAndData @argsAndTest"; + my @res = measure1($commandLine); + store("$i, $program @argsAndTest", @res); + + push(@iterPerPass, shift(@res)); + push(@noopers, shift(@res)); + my @data = @{ shift(@res) }; + if($#res >= 0) { + push(@noevents, shift(@res)); + } + + + shift(@data) if (@data > 1); # discard first run + + #debug("data is @data\n"); + my $ds = Dataset->new(@data); + + push(@timedata, $ds); + } + + outputRow($i, \@iterPerPass, \@noopers, \@timedata, \@noevents); + } + +} + +#--------------------------------------------------------------------- +# Measure a given test method with a give test pattern using the +# global run parameters. +# +# @param the method to run +# @param the pattern defining characters to test +# @param if >0 then the number of iterations per pass. If <0 then +# (negative of) the number of seconds per pass. +# +# @return array of: +# [0] iterations per pass +# [1] events per iteration +# [2..] ms reported for each pass, in order +# +sub measure1 { + # run passes + my @t = callProg(shift); #"$program $args $argsAndTest"); + my @ms = (); + my @b; # scratch + for my $a (@t) { + # $a->[0]: method name, corresponds to $method + # $a->[1]: 'begin' data, == $iterCount + # $a->[2]: 'end' data, of the form <ms> <eventsPerIter> + # $a->[3...]: gc messages from JVM during pass + @b = split(/\s+/, $a->[2]); + #push(@ms, $b[0]); + push(@ms, shift(@b)); + } + my $iterCount = shift(@b); + my $operationsPerIter = shift(@b); + my $eventsPerIter; + if($#b >= 0) { + $eventsPerIter = shift(@b); + } + +# out("Iterations per pass: $iterCount<BR>\n"); +# out("Events per iteration: $eventsPerIter<BR>\n"); +# debug("Iterations per pass: $iterCount<BR>\n"); +# if($eventsPerIter) { +# debug("Events per iteration: $eventsPerIter<BR>\n"); +# } + + my @ms_str = @ms; + $ms_str[0] .= " (discarded)" if (@ms_str > 1); +# out("Raw times (ms/pass): ", join(", ", @ms_str), "<BR>\n"); + debug("Raw times (ms/pass): ", join(", ", @ms_str), "<BR>\n"); + if($eventsPerIter) { + ($iterCount, $operationsPerIter, \@ms, $eventsPerIter); + } else { + ($iterCount, $operationsPerIter, \@ms); + } +} + + + +#--------------------------------------------------------------------- +# Measure a given test method with a give test pattern using the +# global run parameters. +# +# @param the method to run +# @param the pattern defining characters to test +# @param if >0 then the number of iterations per pass. If <0 then +# (negative of) the number of seconds per pass. +# +# @return a Dataset object, scaled by iterations per pass and +# events per iteration, to give time per event +# +sub measure2 { + my @res = measure1(@_); + my $iterPerPass = shift(@res); + my $operationsPerIter = shift(@res); + my @data = @{ shift(@res) }; + my $eventsPerIter = shift(@res); + + + shift(@data) if (@data > 1); # discard first run + + my $ds = Dataset->new(@data); + #$ds->setScale(1.0e-3 / ($iterPerPass * $operationsPerIter)); + ($ds, $iterPerPass, $operationsPerIter, $eventsPerIter); +} + + +#--------------------------------------------------------------------- +# Invoke program and capture results, passing it the given parameters. +# +# @param the method to run +# @param the number of iterations, or if negative, the duration +# in seconds. If more than on pass is desired, pass in +# a string, e.g., "100 100 100". +# @param the pattern defining characters to test +# +# @return an array of results. Each result is an array REF +# describing one pass. The array REF contains: +# ->[0]: The method name as reported +# ->[1]: The params on the '= <meth> begin ...' line +# ->[2]: The params on the '= <meth> end ...' line +# ->[3..]: GC messages from the JVM, if any +# +sub callProg { + my $cmd = shift; + #my $pat = shift; + #my $n = shift; + + #my $cmd = "java -cp c:\\dev\\myicu4j\\classes $TESTCLASS $method $n $pat"; + debug( "[$cmd]\n"); # for debugging + open(PIPE, "$cmd|") or die "Can't run \"$cmd\""; + my @out; + while (<PIPE>) { + push(@out, $_); + } + close(PIPE) or die "Program failed: \"$cmd\""; + + @out = grep(!/^\#/, @out); # filter out comments + + #debug( "[", join("\n", @out), "]\n"); + + my @results; + my $method = ''; + my $data = []; + foreach (@out) { + next unless (/\S/); + + if (/^=\s*(\w+)\s*(\w+)\s*(.*)/) { + my ($m, $state, $d) = ($1, $2, $3); + #debug ("$_ => [[$m $state !!!$d!!! $data ]]\n"); + if ($state eq 'begin') { + die "$method was begun but not finished" if ($method); + $method = $m; + push(@$data, $d); + push(@$data, ''); # placeholder for end data + } elsif ($state eq 'end') { + if ($m ne $method) { + die "$method end does not match: $_"; + } + $data->[1] = $d; # insert end data at [1] + #debug( "#$method:", join(";",@$data), "\n"); + unshift(@$data, $method); # add method to start + push(@results, $data); + $method = ''; + $data = []; + } else { + die "Can't parse: $_"; + } + } + + elsif (/^\[/) { + if ($method) { + push(@$data, $_); + } else { + # ignore extraneous GC notices + } + } + + else { + die "Can't parse: $_"; + } + } + + die "$method was begun but not finished" if ($method); + + @results; +} + +sub debug { + my $message; + if($DEBUG != 0) { + foreach $message (@_) { + print STDERR "$message"; + } + } +} + +sub measure1Alan { + #Added here, was global + my $CALIBRATE = 2; # duration in seconds for initial calibration + + my $method = shift; + my $pat = shift; + my $iterCount = shift; # actually might be -seconds/pass + + out("<P>Measuring $method using $pat, "); + if ($iterCount > 0) { + out("$iterCount iterations/pass, $NUMPASSES passes</P>\n"); + } else { + out(-$iterCount, " seconds/pass, $NUMPASSES passes</P>\n"); + } + + # is $iterCount actually -seconds? + if ($iterCount < 0) { + + # calibrate: estimate ms/iteration + print "Calibrating..."; + my @t = callJava($method, $pat, -$CALIBRATE); + print "done.\n"; + + my @data = split(/\s+/, $t[0]->[2]); + my $timePerIter = 1.0e-3 * $data[0] / $data[2]; + + # determine iterations/pass + $iterCount = int(-$iterCount / $timePerIter + 0.5); + + out("<P>Calibration pass ($CALIBRATE sec): "); + out("$data[0] ms, "); + out("$data[2] iterations = "); + out(formatSeconds(4, $timePerIter), "/iteration<BR>\n"); + } + + # run passes + print "Measuring $iterCount iterations x $NUMPASSES passes..."; + my @t = callJava($method, $pat, "$iterCount " x $NUMPASSES); + print "done.\n"; + my @ms = (); + my @b; # scratch + for my $a (@t) { + # $a->[0]: method name, corresponds to $method + # $a->[1]: 'begin' data, == $iterCount + # $a->[2]: 'end' data, of the form <ms> <eventsPerIter> + # $a->[3...]: gc messages from JVM during pass + @b = split(/\s+/, $a->[2]); + push(@ms, $b[0]); + } + my $eventsPerIter = $b[1]; + + out("Iterations per pass: $iterCount<BR>\n"); + out("Events per iteration: $eventsPerIter<BR>\n"); + + my @ms_str = @ms; + $ms_str[0] .= " (discarded)" if (@ms_str > 1); + out("Raw times (ms/pass): ", join(", ", @ms_str), "<BR>\n"); + + ($iterCount, $eventsPerIter, @ms); +} + + +1; + +#eof diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in new file mode 100644 index 00000000000..e255c38940e --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/ubrkperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/ubrkperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = ubrkperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = ubrkperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl new file mode 100755 index 00000000000..4971ecf6f2c --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf.pl @@ -0,0 +1,82 @@ +#!/usr/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"BreakIterator performance regression (ICU 2.0, 2.2 and 2.4)", + "headers"=>"ICU20 ICU22 ICU24", + "operationIs"=>"code point", + "eventIs"=>"break", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $m1 = "-- -m char"; +my $m2 = "-- -m word"; +my $m3 = "-- -m line"; +my $m4 = "-- -m sentence"; + +my $m; + +if(@_ >= 0) { + $m = "-- -m ".shift; +} else { + $m = $m1; +} + +my $p1 = "ubrkperf20.exe"; +my $p2 = "ubrkperf22.exe"; +my $p3 = "ubrkperf24.exe"; + +my $dataFiles = { +"en", ["thesis.txt", + #"2drvb10.txt", + #"ulyss10.txt", + "nvsbl10.txt", + "vfear11a.txt", + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Japanese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", +], +#"th", ["TestNames_Thai.txt", "th18057.txt"] +}; + + +my $tests = { +"TestForwardChar", ["$p1 $m1 TestICUForward", "$p2 $m1 TestICUForward", "$p3 $m1 TestICUForward"], +"TestForwardWord", ["$p1 $m2 TestICUForward", "$p2 $m2 TestICUForward", "$p3 $m2 TestICUForward"], +"TestForwardLine", ["$p1 $m3 TestICUForward", "$p2 $m3 TestICUForward", "$p3 $m3 TestICUForward"], +"TestForwardSentence", ["$p1 $m4 TestICUForward", "$p2 $m4 TestICUForward", "$p3 $m4 TestICUForward"], + +"TestIsBoundChar", ["$p1 $m1 TestICUIsBound", "$p2 $m1 TestICUIsBound", "$p3 $m1 TestICUIsBound"], +"TestIsBoundWord", ["$p1 $m2 TestICUIsBound", "$p2 $m2 TestICUIsBound", "$p3 $m2 TestICUIsBound"], +"TestIsBoundLine", ["$p1 $m3 TestICUIsBound", "$p2 $m3 TestICUIsBound", "$p3 $m3 TestICUIsBound"], +"TestIsBoundSentence", ["$p1 $m4 TestICUIsBound", "$p2 $m4 TestICUIsBound", "$p3 $m4 TestICUIsBound"], + +}; + +runTests($options, $tests, $dataFiles); + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl new file mode 100644 index 00000000000..73983476296 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/UBrkPerf_r.pl @@ -0,0 +1,77 @@ +#!/usr/bin/perl +# ******************************************************************** +# * Copyright (c) 2002-2007, International Business Machines +# * Corporation and others. All Rights Reserved. +# ******************************************************************** + +use strict; + +#Assume we are running outside of the icu source +use lib './icu-3.0/icu/source/test/perf/perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"BreakIterator performance regression (ICU 2.8 and 3.0)", + "headers"=>"ICU28 ICU30", + "operationIs"=>"code point", + "eventIs"=>"break", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"results_ICU4C" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $m1 = "-- -m char"; +my $m2 = "-- -m word"; +my $m3 = "-- -m line"; +my $m4 = "-- -m sentence"; + +my $m; + +if(@_ >= 0) { + $m = "-- -m ".shift; +} else { + $m = $m1; +} + +my $p1 = "icu-2.8/icu/bin/ubrkperf28.exe"; +my $p2 = "icu-3.0/icu/bin/ubrkperf30.exe"; + +my $dataFiles = { +"en", [ + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Japanese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", +], +#"th", ["TestNames_Thai.txt", "th18057.txt"] +}; + + +my $tests = { +"TestForwardChar", ["$p1 $m1 TestICUForward", "$p2 $m1 TestICUForward"], +"TestForwardWord", ["$p1 $m2 TestICUForward", "$p2 $m2 TestICUForward"], +"TestForwardLine", ["$p1 $m3 TestICUForward", "$p2 $m3 TestICUForward"], +"TestForwardSentence", ["$p1 $m4 TestICUForward", "$p2 $m4 TestICUForward"], + +"TestIsBoundChar", ["$p1 $m1 TestICUIsBound", "$p2 $m1 TestICUIsBound"], +"TestIsBoundWord", ["$p1 $m2 TestICUIsBound", "$p2 $m2 TestICUIsBound"], +"TestIsBoundLine", ["$p1 $m3 TestICUIsBound", "$p2 $m3 TestICUIsBound"], +"TestIsBoundSentence", ["$p1 $m4 TestICUIsBound", "$p2 $m4 TestICUIsBound"], + +}; + +runTests($options, $tests, $dataFiles); + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp new file mode 100644 index 00000000000..18ed4038028 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.cpp @@ -0,0 +1,251 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (C) 2001-2005 International Business Machines Corporation + * and others. All Rights Reserved. + * + ********************************************************************/ +/******************************************************************************** +* +* File ubrkperf.cpp +* +* Modification History: +* Name Description +* Vladimir Weinstein First Version, based on collperf +* +********************************************************************************* +*/ + +#include "ubrkperf.h" +#include "uoptions.h" +#include <stdio.h> + + +#if 0 +#ifdef U_DARWIN +#include <ApplicationServices/ApplicationServices.h> +enum{ + kUCTextBreakAllMask = (kUCTextBreakClusterMask | kUCTextBreakWordMask | kUCTextBreakLineMask) + }; +UCTextBreakType breakTypes[4] = {kUCTextBreakCharMask, kUCTextBreakClusterMask, kUCTextBreakWordMask, kUCTextBreakLineMask}; +TextBreakLocatorRef breakRef; +UCTextBreakType macBreakType; + +void createMACBrkIt() { + OSStatus status = noErr; + LocaleRef lref; + status = LocaleRefFromLocaleString(opt_locale, &lref); + status = UCCreateTextBreakLocator(lref, 0, kUCTextBreakAllMask, (TextBreakLocatorRef*)&breakRef); + if(opt_char == TRUE) { + macBreakType = kUCTextBreakClusterMask; + } else if(opt_word == TRUE) { + macBreakType = kUCTextBreakWordMask; + } else if(opt_line == TRUE) { + macBreakType = kUCTextBreakLineMask; + } else if(opt_sentence == TRUE) { + // error + // brkit = BreakIterator::createSentenceInstance(opt_locale, status); + } else { + // default is character iterator + macBreakType = kUCTextBreakClusterMask; + } +} +#endif + + +void doForwardTest() { + if (opt_terse == FALSE) { + printf("Doing the forward test\n"); + } + int32_t noBreaks = 0; + int32_t i = 0; + unsigned long startTime = timeGetTime(); + unsigned long elapsedTime = 0; + if(opt_icu) { + createICUBrkIt(); + brkit->setText(text); + brkit->first(); + if (opt_terse == FALSE) { + printf("Warmup\n"); + } + while(brkit->next() != BreakIterator::DONE) { + noBreaks++; + } + + if (opt_terse == FALSE) { + printf("Measure\n"); + } + startTime = timeGetTime(); + for(i = 0; i < opt_loopCount; i++) { + brkit->first(); + while(brkit->next() != BreakIterator::DONE) { + } + } + + elapsedTime = timeGetTime()-startTime; + } else if(opt_mac) { +#ifdef U_DARWIN + createMACBrkIt(); + UniChar* filePtr = text; + OSStatus status = noErr; + UniCharCount startOffset = 0, breakOffset = 0, numUniChars = textSize; + startOffset = 0; + //printf("\t---Search forward--\n"); + + while (startOffset < numUniChars) + { + status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars, + startOffset, &breakOffset); + //require_action(status == noErr, EXIT, printf( "**UCFindTextBreak failed: startOffset %d, status %d\n", (int)startOffset, (int)status)); + //require_action((breakOffset <= numUniChars),EXIT, printf("**UCFindTextBreak breakOffset too big: startOffset %d, breakOffset %d\n", (int)startOffset, (int)breakOffset)); + + // Output break + //printf("\t%d\n", (int)breakOffset); + + // Increment counters + noBreaks++; + startOffset = breakOffset; + } + startTime = timeGetTime(); + for(i = 0; i < opt_loopCount; i++) { + startOffset = 0; + + while (startOffset < numUniChars) + { + status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars, + startOffset, &breakOffset); + // Increment counters + startOffset = breakOffset; + } + } + elapsedTime = timeGetTime()-startTime; + UCDisposeTextBreakLocator(&breakRef); +#endif + + + } + + + if (opt_terse == FALSE) { + int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount)); + int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize)); + int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks)); + printf("forward break iteration average loop time %d\n", loopTime); + printf("number of code units %d average time per code unit %d\n", textSize, timePerCU); + printf("number of breaks %d average time per break %d\n", noBreaks, timePerBreak); + } else { + printf("time=%d\nevents=%d\nsize=%d\n", elapsedTime, noBreaks, textSize); + } + + +} + + + + +#endif + +UPerfFunction* BreakIteratorPerformanceTest::TestICUForward() +{ + return new ICUForward(locale, m_mode_, m_file_, m_fileLen_); +} + +UPerfFunction* BreakIteratorPerformanceTest::TestICUIsBound() +{ + return new ICUIsBound(locale, m_mode_, m_file_, m_fileLen_); +} + +UPerfFunction* BreakIteratorPerformanceTest::TestDarwinForward() +{ + return NULL; +} + +UPerfFunction* BreakIteratorPerformanceTest::TestDarwinIsBound() +{ + return NULL; +} + +UPerfFunction* BreakIteratorPerformanceTest::runIndexedTest(int32_t index, UBool exec, + const char *&name, + char* par) +{ + switch (index) { + TESTCASE(0, TestICUForward); + TESTCASE(1, TestICUIsBound); + TESTCASE(2, TestDarwinForward); + TESTCASE(3, TestDarwinIsBound); + default: + name = ""; + return NULL; + } + return NULL; +} + +UOption options[]={ + UOPTION_DEF( "mode", 'm', UOPT_REQUIRES_ARG) + }; + + +BreakIteratorPerformanceTest::BreakIteratorPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status) +: UPerfTest(argc,argv,status), +m_mode_(NULL), +m_file_(NULL), +m_fileLen_(0) +{ + + _remainingArgc = u_parseArgs(_remainingArgc, (char**)argv, (int32_t)(sizeof(options)/sizeof(options[0])), options); + + + if(options[0].doesOccur) { + m_mode_ = options[0].value; + switch(options[0].value[0]) { + case 'w' : + case 'c' : + case 's' : + case 'l' : + break; + default: + status = U_ILLEGAL_ARGUMENT_ERROR; + break; + } + } else { + status = U_ILLEGAL_ARGUMENT_ERROR; + } + + m_file_ = getBuffer(m_fileLen_, status); + + if(status== U_ILLEGAL_ARGUMENT_ERROR){ + fprintf(stderr, gUsageString, "normperf"); + fprintf(stderr, "\t-m or --mode Required mode for breakiterator: char, word, line or sentence\n"); + + return; + } + + if(U_FAILURE(status)){ + fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", u_errorName(status)); + return; + } +} + +BreakIteratorPerformanceTest::~BreakIteratorPerformanceTest() +{ +} + + +//---------------------------------------------------------------------------------------- +// +// Main -- process command line, read in and pre-process the test file, +// call other functions to do the actual tests. +// +//---------------------------------------------------------------------------------------- +int main(int argc, const char** argv) { + UErrorCode status = U_ZERO_ERROR; + BreakIteratorPerformanceTest test(argc, argv, status); + if(U_FAILURE(status)){ + return status; + } + if(test.run()==FALSE){ + fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n"); + return -1; + } + return 0; +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp new file mode 100644 index 00000000000..d3417e55961 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.dsp @@ -0,0 +1,172 @@ +# Microsoft Developer Studio Project File - Name="ubrkperf" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=UBRKPERF - WIN32 RELEASE
+!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 "ubrkperf.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 "ubrkperf.mak" CFG="UBRKPERF - WIN32 RELEASE"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ubrkperf - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf - Win64 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)" == "ubrkperf - 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# 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 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\..\bin\ubrkperf24.exe" /libpath:"..\..\..\..\lib\\"
+# Begin Custom Build
+InputPath=\dev\0_icu\bin\ubrkperf24.exe
+SOURCE="$(InputPath)"
+
+"c:\dev\0_icu\bin\ubrkperf22.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ copy $(InputPath) c:\dev\0_icu\bin\ubrkperf22.exe
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ubrkperf - 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /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 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\"
+
+!ELSEIF "$(CFG)" == "ubrkperf - Win64 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c
+# SUBTRACT CPP /YX
+# 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:IX86 /machine:IA64
+# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\..\lib\\" /machine:IA64
+
+!ELSEIF "$(CFG)" == "ubrkperf - Win64 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\..\include" /I "..\..\..\tools\toolutil" /I "..\..\..\common" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /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:IX86 /pdbtype:sept /machine:IA64
+# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\..\lib\\" /machine:IA64
+
+!ENDIF
+
+# Begin Target
+
+# Name "ubrkperf - Win32 Release"
+# Name "ubrkperf - Win32 Debug"
+# Name "ubrkperf - Win64 Release"
+# Name "ubrkperf - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\ubrkperf.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\ubrkperf.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/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h new file mode 100644 index 00000000000..4c55a73976c --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.h @@ -0,0 +1,137 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +********************************************************************** +*/ +#ifndef _UBRKPERF_H +#define _UBRKPERF_H + +#include "unicode/uperf.h" + +#include <unicode/brkiter.h> + +class ICUBreakFunction : public UPerfFunction { +protected: + BreakIterator *m_brkIt_; + const UChar *m_file_; + int32_t m_fileLen_; + int32_t m_noBreaks_; + UErrorCode m_status_; +public: + ICUBreakFunction(const char *locale, const char *mode, const UChar *file, int32_t file_len) : + m_brkIt_(NULL), + m_file_(file), + m_fileLen_(file_len), + m_noBreaks_(-1), + m_status_(U_ZERO_ERROR) + { + switch(mode[0]) { + case 'c' : + m_brkIt_ = BreakIterator::createCharacterInstance(locale, m_status_); + break; + case 'w' : + m_brkIt_ = BreakIterator::createWordInstance(locale, m_status_); + break; + case 'l' : + m_brkIt_ = BreakIterator::createLineInstance(locale, m_status_); + break; + case 's' : + m_brkIt_ = BreakIterator::createSentenceInstance(locale, m_status_); + break; + default: + // should not happen as we already check for this in the caller + m_status_ = U_ILLEGAL_ARGUMENT_ERROR; + break; + } + } + + ~ICUBreakFunction() { delete m_brkIt_; } + virtual void call(UErrorCode *status) = 0; + virtual long getOperationsPerIteration() { return m_fileLen_; } + virtual long getEventsPerIteration() { return m_noBreaks_; } + virtual UErrorCode getStatus() { return m_status_; } +}; + +class ICUIsBound : public ICUBreakFunction { +public: + ICUIsBound(const char *locale, const char *mode, const UChar *file, int32_t file_len) : + ICUBreakFunction(locale, mode, file, file_len) + { + m_noBreaks_ = 0; + m_brkIt_->setText(UnicodeString(m_file_, m_fileLen_)); + m_brkIt_->first(); + int32_t j = 0; + for(j = 0; j < m_fileLen_; j++) { + if(m_brkIt_->isBoundary(j)) { + m_noBreaks_++; + } + } + } + virtual void call(UErrorCode *status) + { + m_noBreaks_ = 0; + int32_t j = 0; + for(j = 0; j < m_fileLen_; j++) { + if(m_brkIt_->isBoundary(j)) { + m_noBreaks_++; + } + } + } +}; + +class ICUForward : public ICUBreakFunction { +public: + ICUForward(const char *locale, const char *mode, const UChar *file, int32_t file_len) : + ICUBreakFunction(locale, mode, file, file_len) + { + m_noBreaks_ = 0; + m_brkIt_->setText(UnicodeString(m_file_, m_fileLen_)); + m_brkIt_->first(); + while(m_brkIt_->next() != BreakIterator::DONE) { + m_noBreaks_++; + } + } + virtual void call(UErrorCode *status) + { + m_noBreaks_ = 0; + m_brkIt_->first(); + while(m_brkIt_->next() != BreakIterator::DONE) { + m_noBreaks_++; + } + } +}; + +class DarwinBreakFunction : public UPerfFunction { +#ifdef U_DARWIN +public: + virtual void call(UErrorCode *status) {}; +#else +public: + virtual void call(UErrorCode *status) {}; +#endif +}; + +class BreakIteratorPerformanceTest : public UPerfTest { +private: + const char* m_mode_; + const UChar* m_file_; + int32_t m_fileLen_; + +public: + BreakIteratorPerformanceTest(int32_t argc, const char* argv[], UErrorCode& status); + ~BreakIteratorPerformanceTest(); + + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, + const char* &name, char* par = NULL); + + UPerfFunction* TestICUForward(); + UPerfFunction* TestICUIsBound(); + + UPerfFunction* TestDarwinForward(); + UPerfFunction* TestDarwinIsBound(); + +}; + +#endif // UBRKPERF_H diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj new file mode 100644 index 00000000000..31f5bc03a51 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf.vcproj @@ -0,0 +1,250 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="ubrkperf" + ProjectGUID="{7E280294-49BD-43D1-9903-CF29648D88CA}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/ubrkperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/ubrkperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib" + OutputFile=".\Debug/ubrkperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/ubrkperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/ubrkperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/ubrkperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + OutputFile="..\..\..\..\bin\ubrkperf24.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/ubrkperf24.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="ubrkperf.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="ubrkperf.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp new file mode 100644 index 00000000000..197aed77abe --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperf20.dsp @@ -0,0 +1,172 @@ +# Microsoft Developer Studio Project File - Name="ubrkperf20" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ubrkperf20 - 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 "ubrkperf20.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 "ubrkperf20.mak" CFG="ubrkperf20 - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ubrkperf20 - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf20 - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf20 - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperf20 - Win64 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)" == "ubrkperf20 - 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# 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 c:\src\oldICU\icu-2-0\lib\icuuc.lib c:\src\oldICU\icu-2-0\lib\icuin.lib ..\..\..\..\lib\icutu.lib /nologo /subsystem:console /machine:I386 /out:"..\..\..\..\bin\ubrkperf20.exe" /libpath:"..\..\..\..\lib\\"
+# Begin Custom Build
+InputPath=\dev\0_icu\bin\ubrkperf20.exe
+SOURCE="$(InputPath)"
+
+"c:\dev\0_icu\bin\ubrkperf20.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ copy $(InputPath) c:\dev\0_icu\bin\ubrkperf20.exe
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ubrkperf20 - 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /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 c:\src\oldICU\icu-2-0\lib\icuucd.lib c:\src\oldICU\icu-2-0\lib\icuind.lib ..\..\..\..\lib\icutud.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ELSEIF "$(CFG)" == "ubrkperf20 - Win64 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c
+# SUBTRACT CPP /YX
+# 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:IX86 /machine:IA64
+# ADD LINK32 c:\src\oldICU\icu-2-0\lib\icuuc.lib c:\src\oldICU\icu-2-0\lib\icuin.lib ..\..\..\..\lib\icutu.lib /nologo /subsystem:console /machine:IX86 /machine:IA64
+
+!ELSEIF "$(CFG)" == "ubrkperf20 - Win64 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "c:\src\oldICU\icu-2-0\include" /I "..\..\..\tools\toolutil" /I "c:\src\oldICU\icu-2-0\source\common" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /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:IX86 /pdbtype:sept /machine:IA64
+# ADD LINK32 c:\src\oldICU\icu-2-0\lib\icuucd.lib c:\src\oldICU\icu-2-0\lib\icuind.lib ..\..\..\..\lib\icutud.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /machine:IA64
+
+!ENDIF
+
+# Begin Target
+
+# Name "ubrkperf20 - Win32 Release"
+# Name "ubrkperf20 - Win32 Debug"
+# Name "ubrkperf20 - Win64 Release"
+# Name "ubrkperf20 - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\..\..\dev\0_icu\source\test\perf\ubrkperf\ubrkperf.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\ubrkperf.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/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp new file mode 100644 index 00000000000..4ab8190f5ba --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.cpp @@ -0,0 +1,771 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (C) 2001-2005 IBM, Inc. All Rights Reserved. + * + ********************************************************************/ +/******************************************************************************** +* +* File ubrkperf.cpp +* +* Modification History: +* Name Description +* Vladimir Weinstein First Version, based on collperf +* +********************************************************************************* +*/ + +// +// This program tests break iterator performance +// Currently we test only ICU APIs with the future possibility of testing *nix & win32 APIs +// (if any) +// A text file is required as input. It must be in utf-8 or utf-16 format, +// and include a byte order mark. Either LE or BE format is OK. +// + +const char gUsageString[] = + "usage: ubrkperf options...\n" + "-help Display this message.\n" + "-file file_name utf-16/utf-8 format file.\n" + "-locale name ICU locale to use. Default is en_US\n" + "-langid 0x1234 Windows Language ID number. Default to value for -locale option\n" + " see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm\n" + "-win Run test using Windows native services. (currently not working) (ICU is default)\n" + "-unix Run test using Unix word breaking services. (currently not working) \n" + "-mac Run test using MacOSX word breaking services.\n" + "-uselen Use API with string lengths. Default is null-terminated strings\n" + "-char Use character break iterator\n" + "-word Use word break iterator\n" + "-line Use line break iterator\n" + "-sentence Use sentence break iterator\n" + "-loop nnnn Loopcount for test. Adjust for reasonable total running time.\n" + "-iloop n Inner Loop Count. Default = 1. Number of calls to function\n" + " under test at each call point. For measuring test overhead.\n" + "-terse Terse numbers-only output. Intended for use by scripts.\n" + "-dump Display stuff.\n" + "-capi Use C APIs instead of C++ APIs (currently not working)\n" + "-next Do the next test\n" + "-isBound Do the isBound test\n" + ; + + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <math.h> +#include <locale.h> +#include <errno.h> +#include <sys/stat.h> + +#include <unicode/utypes.h> +#include <unicode/ucol.h> +#include <unicode/ucoleitr.h> +#include <unicode/uloc.h> +#include <unicode/ustring.h> +#include <unicode/ures.h> +#include <unicode/uchar.h> +#include <unicode/ucnv.h> +#include <unicode/utf8.h> + +#include <unicode/brkiter.h> + + +#ifdef U_WINDOWS +#include <windows.h> +#else +// +// Stubs for Windows API functions when building on UNIXes. +// +#include <sys/time.h> +unsigned long timeGetTime() { + struct timeval t; + gettimeofday(&t, 0); + unsigned long val = t.tv_sec * 1000; // Let it overflow. Who cares. + val += t.tv_usec / 1000; + return val; +}; +#define MAKELCID(a,b) 0 +#endif + + +// +// Command line option variables +// These global variables are set according to the options specified +// on the command line by the user. +char * opt_fName = 0; +char * opt_locale = "en_US"; +int opt_langid = 0; // Defaults to value corresponding to opt_locale. +char * opt_rules = 0; +UBool opt_help = FALSE; +int opt_time = 0; +int opt_loopCount = 0; +int opt_passesCount= 1; +UBool opt_terse = FALSE; +UBool opt_icu = TRUE; +UBool opt_win = FALSE; // Run with Windows native functions. +UBool opt_unix = FALSE; // Run with UNIX strcoll, strxfrm functions. +UBool opt_mac = FALSE; // Run with MacOSX word break services. +UBool opt_uselen = FALSE; +UBool opt_dump = FALSE; +UBool opt_char = FALSE; +UBool opt_word = FALSE; +UBool opt_line = FALSE; +UBool opt_sentence = FALSE; +UBool opt_capi = FALSE; + +UBool opt_next = FALSE; +UBool opt_isBound = FALSE; + + + +// +// Definitions for the command line options +// +struct OptSpec { + const char *name; + enum {FLAG, NUM, STRING} type; + void *pVar; +}; + +OptSpec opts[] = { + {"-file", OptSpec::STRING, &opt_fName}, + {"-locale", OptSpec::STRING, &opt_locale}, + {"-langid", OptSpec::NUM, &opt_langid}, + {"-win", OptSpec::FLAG, &opt_win}, + {"-unix", OptSpec::FLAG, &opt_unix}, + {"-mac", OptSpec::FLAG, &opt_mac}, + {"-uselen", OptSpec::FLAG, &opt_uselen}, + {"-loop", OptSpec::NUM, &opt_loopCount}, + {"-time", OptSpec::NUM, &opt_time}, + {"-passes", OptSpec::NUM, &opt_passesCount}, + {"-char", OptSpec::FLAG, &opt_char}, + {"-word", OptSpec::FLAG, &opt_word}, + {"-line", OptSpec::FLAG, &opt_line}, + {"-sentence", OptSpec::FLAG, &opt_sentence}, + {"-terse", OptSpec::FLAG, &opt_terse}, + {"-dump", OptSpec::FLAG, &opt_dump}, + {"-capi", OptSpec::FLAG, &opt_capi}, + {"-next", OptSpec::FLAG, &opt_next}, + {"-isBound", OptSpec::FLAG, &opt_isBound}, + {"-help", OptSpec::FLAG, &opt_help}, + {"-?", OptSpec::FLAG, &opt_help}, + {0, OptSpec::FLAG, 0} +}; + + +//--------------------------------------------------------------------------- +// +// Global variables pointing to and describing the test file +// +//--------------------------------------------------------------------------- + +//DWORD gWinLCID; +BreakIterator *brkit = NULL; +UChar *text = NULL; +int32_t textSize = 0; + + + +#ifdef U_DARWIN +#include <ApplicationServices/ApplicationServices.h> +enum{ + kUCTextBreakAllMask = (kUCTextBreakClusterMask | kUCTextBreakWordMask | kUCTextBreakLineMask) + }; +UCTextBreakType breakTypes[4] = {kUCTextBreakCharMask, kUCTextBreakClusterMask, kUCTextBreakWordMask, kUCTextBreakLineMask}; +TextBreakLocatorRef breakRef; +UCTextBreakType macBreakType; + +void createMACBrkIt() { + OSStatus status = noErr; + LocaleRef lref; + status = LocaleRefFromLocaleString(opt_locale, &lref); + status = UCCreateTextBreakLocator(lref, 0, kUCTextBreakAllMask, (TextBreakLocatorRef*)&breakRef); + if(opt_char == TRUE) { + macBreakType = kUCTextBreakClusterMask; + } else if(opt_word == TRUE) { + macBreakType = kUCTextBreakWordMask; + } else if(opt_line == TRUE) { + macBreakType = kUCTextBreakLineMask; + } else if(opt_sentence == TRUE) { + // error + // brkit = BreakIterator::createSentenceInstance(opt_locale, status); + } else { + // default is character iterator + macBreakType = kUCTextBreakClusterMask; + } +} +#endif + +void createICUBrkIt() { + // + // Set up an ICU break iterator + // + UErrorCode status = U_ZERO_ERROR; + if(opt_char == TRUE) { + brkit = BreakIterator::createCharacterInstance(opt_locale, status); + } else if(opt_word == TRUE) { + brkit = BreakIterator::createWordInstance(opt_locale, status); + } else if(opt_line == TRUE) { + brkit = BreakIterator::createLineInstance(opt_locale, status); + } else if(opt_sentence == TRUE) { + brkit = BreakIterator::createSentenceInstance(opt_locale, status); + } else { + // default is character iterator + brkit = BreakIterator::createCharacterInstance(opt_locale, status); + } + if (status==U_USING_DEFAULT_WARNING && opt_terse==FALSE) { + fprintf(stderr, "Warning, U_USING_DEFAULT_WARNING for %s\n", opt_locale); + } + if (status==U_USING_FALLBACK_WARNING && opt_terse==FALSE) { + fprintf(stderr, "Warning, U_USING_FALLBACK_ERROR for %s\n", opt_locale); + } + +} + +//--------------------------------------------------------------------------- +// +// ProcessOptions() Function to read the command line options. +// +//--------------------------------------------------------------------------- +UBool ProcessOptions(int argc, const char **argv, OptSpec opts[]) +{ + int i; + int argNum; + const char *pArgName; + OptSpec *pOpt; + + for (argNum=1; argNum<argc; argNum++) { + pArgName = argv[argNum]; + for (pOpt = opts; pOpt->name != 0; pOpt++) { + if (strcmp(pOpt->name, pArgName) == 0) { + switch (pOpt->type) { + case OptSpec::FLAG: + *(UBool *)(pOpt->pVar) = TRUE; + break; + case OptSpec::STRING: + argNum ++; + if (argNum >= argc) { + fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name); + return FALSE; + } + *(const char **)(pOpt->pVar) = argv[argNum]; + break; + case OptSpec::NUM: + argNum ++; + if (argNum >= argc) { + fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name); + return FALSE; + } + char *endp; + i = strtol(argv[argNum], &endp, 0); + if (endp == argv[argNum]) { + fprintf(stderr, "integer value expected for \"%s\" option.\n", pOpt->name); + return FALSE; + } + *(int *)(pOpt->pVar) = i; + } + break; + } + } + if (pOpt->name == 0) + { + fprintf(stderr, "Unrecognized option \"%s\"\n", pArgName); + return FALSE; + } + } +return TRUE; +} + + +void doForwardTest() { + if (opt_terse == FALSE) { + printf("Doing the forward test\n"); + } + int32_t noBreaks = 0; + int32_t i = 0; + unsigned long startTime = timeGetTime(); + unsigned long elapsedTime = 0; + if(opt_icu) { + createICUBrkIt(); + brkit->setText(UnicodeString(text, textSize)); + brkit->first(); + if (opt_terse == FALSE) { + printf("Warmup\n"); + } + int j; + while((j = brkit->next()) != BreakIterator::DONE) { + noBreaks++; + //fprintf(stderr, "%d ", j); + } + + if (opt_terse == FALSE) { + printf("Measure\n"); + } + startTime = timeGetTime(); + for(i = 0; i < opt_loopCount; i++) { + brkit->first(); + while(brkit->next() != BreakIterator::DONE) { + } + } + + elapsedTime = timeGetTime()-startTime; + } else if(opt_mac) { +#ifdef U_DARWIN + createMACBrkIt(); + UniChar* filePtr = text; + OSStatus status = noErr; + UniCharCount startOffset = 0, breakOffset = 0, numUniChars = textSize; + startOffset = 0; + //printf("\t---Search forward--\n"); + + while (startOffset < numUniChars) + { + status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars, + startOffset, &breakOffset); + //require_action(status == noErr, EXIT, printf( "**UCFindTextBreak failed: startOffset %d, status %d\n", (int)startOffset, (int)status)); + //require_action((breakOffset <= numUniChars),EXIT, printf("**UCFindTextBreak breakOffset too big: startOffset %d, breakOffset %d\n", (int)startOffset, (int)breakOffset)); + + // Output break + //printf("\t%d\n", (int)breakOffset); + + // Increment counters + noBreaks++; + startOffset = breakOffset; + } + startTime = timeGetTime(); + for(i = 0; i < opt_loopCount; i++) { + startOffset = 0; + + while (startOffset < numUniChars) + { + status = UCFindTextBreak(breakRef, macBreakType, kUCTextBreakLeadingEdgeMask, filePtr, numUniChars, + startOffset, &breakOffset); + // Increment counters + startOffset = breakOffset; + } + } + elapsedTime = timeGetTime()-startTime; + UCDisposeTextBreakLocator(&breakRef); +#endif + + + } + + + if (opt_terse == FALSE) { + int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount)); + int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize)); + int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks)); + printf("forward break iteration average loop time %d\n", loopTime); + printf("number of code units %d average time per code unit %d\n", textSize, timePerCU); + printf("number of breaks %d average time per break %d\n", noBreaks, timePerBreak); + } else { + printf("time=%d\nevents=%d\nsize=%d\n", elapsedTime, noBreaks, textSize); + } + + +} + +void doIsBoundTest() { + int32_t noBreaks = 0, hit = 0; + int32_t i = 0, j = 0; + unsigned long startTime = timeGetTime(); + unsigned long elapsedTime = 0; + createICUBrkIt(); + brkit->setText(UnicodeString(text, textSize)); + brkit->first(); + for(j = 0; j < textSize; j++) { + if(brkit->isBoundary(j)) { + noBreaks++; + //fprintf(stderr, "%d ", j); + } + } + /* + while(brkit->next() != BreakIterator::DONE) { + noBreaks++; + } + */ + + startTime = timeGetTime(); + for(i = 0; i < opt_loopCount; i++) { + for(j = 0; j < textSize; j++) { + if(brkit->isBoundary(j)) { + hit++; + } + } + } + + elapsedTime = timeGetTime()-startTime; + int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount)); + if (opt_terse == FALSE) { + int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize)); + int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks)); + printf("forward break iteration average loop time %d\n", loopTime); + printf("number of code units %d average time per code unit %d\n", textSize, timePerCU); + printf("number of breaks %d average time per break %d\n", noBreaks, timePerBreak); + } else { + printf("time=%d\nevents=%d\nsize=%d\n", elapsedTime, noBreaks, textSize); + } +} + +//---------------------------------------------------------------------------------------- +// +// UnixConvert -- Convert the lines of the file to the encoding for UNIX +// Since it appears that Unicode support is going in the general +// direction of the use of UTF-8 locales, that is the approach +// that is used here. +// +//---------------------------------------------------------------------------------------- +void UnixConvert() { +#if 0 + int line; + + UConverter *cvrtr; // An ICU code page converter. + UErrorCode status = U_ZERO_ERROR; + + + cvrtr = ucnv_open("utf-8", &status); // we are just doing UTF-8 locales for now. + if (U_FAILURE(status)) { + fprintf(stderr, "ICU Converter open failed.: %d\n", &status); + exit(-1); + } + // redo for unix + for (line=0; line < gNumFileLines; line++) { + int sizeNeeded = ucnv_fromUChars(cvrtr, + 0, // ptr to target buffer. + 0, // length of target buffer. + gFileLines[line].name, + -1, // source is null terminated + &status); + if (status != U_BUFFER_OVERFLOW_ERROR && status != U_ZERO_ERROR) { + fprintf(stderr, "Conversion from Unicode, something is wrong.\n"); + exit(-1); + } + status = U_ZERO_ERROR; + gFileLines[line].unixName = new char[sizeNeeded+1]; + sizeNeeded = ucnv_fromUChars(cvrtr, + gFileLines[line].unixName, // ptr to target buffer. + sizeNeeded+1, // length of target buffer. + gFileLines[line].name, + -1, // source is null terminated + &status); + if (U_FAILURE(status)) { + fprintf(stderr, "ICU Conversion Failed.: %d\n", status); + exit(-1); + } + gFileLines[line].unixName[sizeNeeded] = 0; + }; + ucnv_close(cvrtr); +#endif +} + + +//---------------------------------------------------------------------------------------- +// +// class UCharFile Class to hide all the gorp to read a file in +// and produce a stream of UChars. +// +//---------------------------------------------------------------------------------------- +class UCharFile { +public: + UCharFile(const char *fileName); + ~UCharFile(); + UChar get(); + UBool eof() {return fEof;}; + UBool error() {return fError;}; + int32_t size() { return fFileSize; }; + +private: + UCharFile (const UCharFile &other) {}; // No copy constructor. + UCharFile & operator = (const UCharFile &other) {return *this;}; // No assignment op + + FILE *fFile; + const char *fName; + UBool fEof; + UBool fError; + UChar fPending2ndSurrogate; + int32_t fFileSize; + + enum {UTF16LE, UTF16BE, UTF8} fEncoding; +}; + +UCharFile::UCharFile(const char * fileName) { + fEof = FALSE; + fError = FALSE; + fName = fileName; + struct stat buf; + int32_t result = stat(fileName, &buf); + if(result != 0) { + fprintf(stderr, "Error getting info\n"); + fFileSize = -1; + } else { + fFileSize = buf.st_size; + } + fFile = fopen(fName, "rb"); + fPending2ndSurrogate = 0; + if (fFile == NULL) { + fprintf(stderr, "Can not open file \"%s\"\n", opt_fName); + fError = TRUE; + return; + } + // + // Look for the byte order mark at the start of the file. + // + int BOMC1, BOMC2, BOMC3; + BOMC1 = fgetc(fFile); + BOMC2 = fgetc(fFile); + + if (BOMC1 == 0xff && BOMC2 == 0xfe) { + fEncoding = UTF16LE; } + else if (BOMC1 == 0xfe && BOMC2 == 0xff) { + fEncoding = UTF16BE; } + else if (BOMC1 == 0xEF && BOMC2 == 0xBB && (BOMC3 = fgetc(fFile)) == 0xBF ) { + fEncoding = UTF8; } + else + { + fprintf(stderr, "collperf: file \"%s\" encoding must be UTF-8 or UTF-16, and " + "must include a BOM.\n", fileName); + fError = true; + return; + } +} + + +UCharFile::~UCharFile() { + fclose(fFile); +} + + + +UChar UCharFile::get() { + UChar c; + switch (fEncoding) { + case UTF16LE: + { + int cL, cH; + cL = fgetc(fFile); + cH = fgetc(fFile); + c = cL | (cH << 8); + if (cH == EOF) { + c = 0; + fEof = TRUE; + } + break; + } + case UTF16BE: + { + int cL, cH; + cH = fgetc(fFile); + cL = fgetc(fFile); + c = cL | (cH << 8); + if (cL == EOF) { + c = 0; + fEof = TRUE; + } + break; + } + case UTF8: + { + if (fPending2ndSurrogate != 0) { + c = fPending2ndSurrogate; + fPending2ndSurrogate = 0; + break; + } + + int ch = fgetc(fFile); // Note: c and ch are separate cause eof test doesn't work on UChar type. + if (ch == EOF) { + c = 0; + fEof = TRUE; + break; + } + + if (ch <= 0x7f) { + // It's ascii. No further utf-8 conversion. + c = ch; + break; + } + + // Figure out the lenght of the char and read the rest of the bytes + // into a temp array. + int nBytes; + if (ch >= 0xF0) {nBytes=4;} + else if (ch >= 0xE0) {nBytes=3;} + else if (ch >= 0xC0) {nBytes=2;} + else { + fprintf(stderr, "not likely utf-8 encoded file %s contains corrupt data at offset %d.\n", fName, ftell(fFile)); + fError = TRUE; + return 0; + } + + unsigned char bytes[10]; + bytes[0] = (unsigned char)ch; + int i; + for (i=1; i<nBytes; i++) { + bytes[i] = fgetc(fFile); + if (bytes[i] < 0x80 || bytes[i] >= 0xc0) { + fprintf(stderr, "utf-8 encoded file %s contains corrupt data at offset %d. Expected %d bytes, byte %d is invalid. First byte is %02X\n", fName, ftell(fFile), nBytes, i, ch); + fError = TRUE; + return 0; + } + } + + // Convert the bytes from the temp array to a Unicode char. + i = 0; + uint32_t cp; + UTF8_NEXT_CHAR_UNSAFE(bytes, i, cp); + c = (UChar)cp; + + if (cp >= 0x10000) { + // The code point needs to be broken up into a utf-16 surrogate pair. + // Process first half this time through the main loop, and + // remember the other half for the next time through. + UChar utf16Buf[3]; + i = 0; + UTF16_APPEND_CHAR_UNSAFE(utf16Buf, i, cp); + fPending2ndSurrogate = utf16Buf[1]; + c = utf16Buf[0]; + } + break; + }; + } + return c; +} + + +//---------------------------------------------------------------------------------------- +// +// Main -- process command line, read in and pre-process the test file, +// call other functions to do the actual tests. +// +//---------------------------------------------------------------------------------------- +int main(int argc, const char** argv) { + if (ProcessOptions(argc, argv, opts) != TRUE || opt_help || opt_fName == 0) { + printf(gUsageString); + exit (1); + } + // Make sure that we've only got one API selected. + if (opt_mac || opt_unix || opt_win) opt_icu = FALSE; + if (opt_mac || opt_unix) opt_win = FALSE; + if (opt_mac) opt_unix = FALSE; + + UErrorCode status = U_ZERO_ERROR; + + + + // + // Set up a Windows LCID + // + /* + if (opt_langid != 0) { + gWinLCID = MAKELCID(opt_langid, SORT_DEFAULT); + } + else { + gWinLCID = uloc_getLCID(opt_locale); + } + */ + + // + // Set the UNIX locale + // + if (opt_unix) { + if (setlocale(LC_ALL, opt_locale) == 0) { + fprintf(stderr, "setlocale(LC_ALL, %s) failed.\n", opt_locale); + exit(-1); + } + } + + // Read in the input file. + // File assumed to be utf-16. + // Lines go onto heap buffers. Global index array to line starts is created. + // Lines themselves are null terminated. + // + + UCharFile f(opt_fName); + if (f.error()) { + exit(-1); + } + int32_t fileSize = f.size(); + const int STARTSIZE = 70000; + int32_t bufSize = 0; + int32_t charCount = 0; + if(fileSize != -1) { + text = (UChar *)malloc(fileSize*sizeof(UChar)); + bufSize = fileSize; + } else { + text = (UChar *)malloc(STARTSIZE*sizeof(UChar)); + bufSize = STARTSIZE; + } + if(text == NULL) { + fprintf(stderr, "Allocating buffer failed\n"); + exit(-1); + } + + + // Read the file, split into lines, and save in memory. + // Loop runs once per utf-16 value from the input file, + // (The number of bytes read from file per loop iteration depends on external encoding.) + for (;;) { + + UChar c = f.get(); + if(f.eof()) { + break; + } + if (f.error()){ + exit(-1); + } + // We now have a good UTF-16 value in c. + text[charCount++] = c; + if(charCount == bufSize) { + text = (UChar *)realloc(text, 2*bufSize*sizeof(UChar)); + if(text == NULL) { + fprintf(stderr, "Reallocating buffer failed\n"); + exit(-1); + } + bufSize *= 2; + } + } + + + if (opt_terse == FALSE) { + printf("file \"%s\", %d charCount code units.\n", opt_fName, charCount); + } + + textSize = charCount; + + + + + // + // Dump file contents if requested. + // + if (opt_dump) { + // dump file, etc... possibly + } + + + // + // We've got the file read into memory. Go do something with it. + // + int32_t i = 0; + for(i = 0; i < opt_passesCount; i++) { + if(opt_loopCount != 0) { + if(opt_next) { + doForwardTest(); + } else if(opt_isBound) { + doIsBoundTest(); + } else { + doForwardTest(); + } + } else if(opt_time != 0) { + + } + } + + if(text != NULL) { + free(text); + } + if(brkit != NULL) { + delete brkit; + } + + return 0; +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp new file mode 100644 index 00000000000..2befc0aba27 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ubrkperf/ubrkperfold.dsp @@ -0,0 +1,168 @@ +# Microsoft Developer Studio Project File - Name="ubrkperfold" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ubrkperfold - 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 "ubrkperfold.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 "ubrkperfold.mak" CFG="ubrkperfold - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ubrkperfold - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperfold - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperfold - Win64 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ubrkperfold - Win64 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)" == "ubrkperfold - 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /GX /O2 /Ob2 /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# 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 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\lib\\"
+# Begin Custom Build
+InputPath=.\Release\ubrkperfold.exe
+SOURCE="$(InputPath)"
+
+"c:\dev\0_icu\bin\ubrkperf20.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ copy $(InputPath) c:\dev\0_icu\bin\ubrkperf20.exe
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ubrkperfold - 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /G6 /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\..\tools\ctestfw" /I "..\..\..\common" /I "..\..\..\i18n" /I "..\..\..\tools\toolutil" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /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 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\\"
+
+!ELSEIF "$(CFG)" == "ubrkperfold - Win64 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Op /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FD /Wp64 /Zm600 /c
+# SUBTRACT CPP /YX
+# 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:IX86 /machine:IA64
+# ADD LINK32 icuuc.lib icuin.lib ctestfw.lib icutu.lib kernel32.lib user32.lib advapi32.lib shell32.lib winmm.lib /nologo /subsystem:console /machine:IX86 /libpath:"..\..\..\lib\\" /machine:IA64
+
+!ELSEIF "$(CFG)" == "ubrkperfold - Win64 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 ""
+MTL=midl.exe
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Op /I "..\..\..\include" /I "..\..\tools\ctestfw" /I "..\..\common" /I "..\..\i18n" /I "..\..\tools\toolutil" /D "WIN64" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_IA64_" /D "WIN32" /D "_AFX_NO_DAO_SUPPORT" /FR /FD /GZ /Wp64 /Zm600 /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:IX86 /pdbtype:sept /machine:IA64
+# ADD LINK32 icuucd.lib icuind.lib icutud.lib winmm.lib /nologo /subsystem:console /incremental:no /debug /machine:IX86 /pdbtype:sept /libpath:"..\..\..\lib\\" /machine:IA64
+
+!ENDIF
+
+# Begin Target
+
+# Name "ubrkperfold - Win32 Release"
+# Name "ubrkperfold - Win32 Debug"
+# Name "ubrkperfold - Win64 Release"
+# Name "ubrkperfold - Win64 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\ubrkperfold.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# 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/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in new file mode 100644 index 00000000000..07c62d657da --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/Makefile.in @@ -0,0 +1,78 @@ +## Makefile.in for ICU - test/perf/unisetperf +## Copyright (c) 2001-2007, 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 + +## Build directory information +subdir = test/perf/unisetperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = unisetperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = unisetperf.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) + +invoke: + ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION) + +ifeq (,$(MAKECMDGOALS)) +-include $(DEPS) +else +ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp new file mode 100644 index 00000000000..487d0c0985f --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/bitset.cpp @@ -0,0 +1,197 @@ +/* +********************************************************************** +* Copyright (C) 2007, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: bitset.cpp +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2007jan15 +* created by: Markus Scherer +* +* Idea for a "compiled", fast, read-only (immutable) version of a UnicodeSet +* using a folded bit set consisting of a 1k-entry index table and a +* compacted array of 64-bit words. +* Uses a simple hash table for compaction. +* Uses the original set for supplementary code points. +*/ + +#include "unicode/utypes.h" +#include "unicont.h" + +/* + * Hash table for up to 1k 64-bit words, for 1 bit per BMP code point. + * Hashes 64-bit words and maps them to 16-bit integers which are + * assigned in order of new incoming words for subsequent storage + * in a contiguous array. + */ +struct BMPBitHash : public UObject { + int64_t keys[0x800]; // 2k + uint16_t values[0x800]; + uint16_t reverse[0x400]; + uint16_t count; + const int32_t prime=1301; // Less than 2k. + + BMPBitHash() : count(0) { + // Fill values[] with 0xffff. + uprv_memset(values, 0xff, sizeof(values)); + } + + /* + * Map a key to an integer count. + * Map at most 1k=0x400 different keys with this data structure. + */ + uint16_t map(int64_t key) { + int32_t hash=(int32_t)(key>>55)&0x1ff; + hash^=(int32_t)(key>>44)&0x7ff; + hash^=(int32_t)(key>>33)&0x7ff; + hash^=(int32_t)(key>>22)&0x7ff; + hash^=(int32_t)(key>>11)&0x7ff; + hash^=(int32_t)key&0x7ff; + for(;;) { + if(values[hash]==0xffff) { + // Unused slot. + keys[hash]=key; + reverse[count]=hash; + return values[hash]=count++; + } else if(keys[hash]==key) { + // Found a slot with this key. + return values[hash]; + } else { + // Used slot with a different key, move to another slot. + hash=(hash+prime)&0x7ff; + } + } + } + + uint16_t countKeys() const { return count; } + + /* + * Invert the hash map: Fill an array of length countKeys() with the keys + * indexed by their mapped values. + */ + void invert(int64_t *k) const { + uint16_t i; + + for(i=0; i<count; ++i) { + k[i]=keys[reverse[i]]; + } + } +}; + +class BitSet : public UObject, public UnicodeContainable { +public: + BitSet(const UnicodeSet &set, UErrorCode &errorCode) : bits(shortBits), restSet(set.clone()) { + if(U_FAILURE(errorCode)) { + return; + } + BMPBitHash *bitHash=new BMPBitHash; + if(bitHash==NULL || restSet==NULL) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + return; + } + + UnicodeSetIterator iter(set); + int64_t b; + UChar32 start, end; + int32_t prevIndex, i, j; + + b=0; // Not necessary but makes compilers happy. + prevIndex=-1; + for(;;) { + if(iter.nextRange() && !iter.isString()) { + start=iter.getCodepoint(); + end=iter.getCodepointEnd(); + } else { + start=0x10000; + } + i=start>>6; + if(prevIndex!=i) { + // Finish the end of the previous range. + if(prevIndex<0) { + prevIndex=0; + } else { + index[prevIndex++]=bitHash->map(b); + } + // Fill all-zero entries between ranges. + if(prevIndex<i) { + uint16_t zero=bitHash->map(0); + do { + index[prevIndex++]=zero; + } while(prevIndex<i); + } + b=0; + } + if(start>0xffff) { + break; + } + b|=~((INT64_C(1)<<(start&0x3f))-1); + j=end>>6; + if(i<j) { + // Set bits for the start of the range. + index[i++]=bitHash->map(b); + // Fill all-one entries inside the range. + if(i<j) { + uint16_t all=bitHash->map(INT64_C(0xffffffffffffffff)); + do { + index[i++]=all; + } while(i<j); + } + b=INT64_C(0xffffffffffffffff); + } + /* i==j */ + b&=(INT64_C(1)<<(end&0x3f))-1; + prevIndex=j; + } + + if(bitHash->countKeys()>LENGTHOF(shortBits)) { + bits=(int64_t *)uprv_malloc(bitHash->countKeys()*8); + } + if(bits!=NULL) { + bitHash->invert(bits); + } else { + bits=shortBits; + errorCode=U_MEMORY_ALLOCATION_ERROR; + return; + } + + latin1Set[0]=(uint32_t)bits[0]; + latin1Set[1]=(uint32_t)(bits[0]>>32); + latin1Set[2]=(uint32_t)bits[1]; + latin1Set[3]=(uint32_t)(bits[1]>>32); + latin1Set[4]=(uint32_t)bits[2]; + latin1Set[5]=(uint32_t)(bits[2]>>32); + latin1Set[6]=(uint32_t)bits[3]; + latin1Set[7]=(uint32_t)(bits[3]>>32); + + restSet.remove(0, 0xffff); + } + + ~BitSet() { + if(bits!=shortBits) { + uprv_free(bits); + } + delete restSet; + } + + UBool contains(UChar32 c) const { + if((uint32_t)c<=0xff) { + return (UBool)((latin1Set[c>>5]&((uint32_t)1<<(c&0x1f)))!=0); + } else if((uint32_t)c<0xffff) { + return (UBool)((bits[c>>6]&(INT64_C(1)<<(c&0x3f)))!=0); + } else { + return restSet->contains(c); + } + } + +private: + uint16_t index[0x400]; + int64_t shortBits[32]; + int64_t *bits; + + uint32_t latin1Bits[8]; + + UnicodeSet *restSet; +}; diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat new file mode 100755 index 00000000000..9ba8ea4ee14 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.bat @@ -0,0 +1,19 @@ +rem Copyright (c) 2007, International Business Machines Corporation and +rem others. All Rights Reserved. + +set PERF=c:\svn\icuproj\icu\ucnvutf8\source\test\perf\unisetperf\release\unisetperf +rem types: slow Bv Bv0 B0 +rem --pattern [:White_Space:] + +for %%f in (udhr_eng.txt + udhr_deu.txt + udhr_fra.txt + udhr_rus.txt + udhr_tha.txt + udhr_jpn.txt + udhr_cmn.txt + udhr_jpn.html) do ( + for %%t in (slow Bv Bv0 B0) do ( + %PERF% Contains --type %%t -f \temp\udhr\%%f --pattern [:White_Space:] -v -e UTF-8 --passes 3 --iterations 10000 + ) +) diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh new file mode 100755 index 00000000000..027897ef2e0 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/contperf.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Copyright (c) 2007, International Business Machines Corporation and +# others. All Rights Reserved. + +# Echo shell script commands. +set -ex + +PERF=test/perf/unisetperf/unisetperf +# slow Bv Bv0 B0 +# --pattern [:White_Space:] + +for file in udhr_eng.txt \ + udhr_deu.txt \ + udhr_fra.txt \ + udhr_rus.txt \ + udhr_tha.txt \ + udhr_jpn.txt \ + udhr_cmn.txt \ + udhr_jpn.html; do + for type in slow Bv Bv0; do + $PERF Contains --type $type -f ~/udhr/$file -v -e UTF-8 --passes 3 --iterations 10000 + done +done diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat new file mode 100755 index 00000000000..f67cdb26e69 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.bat @@ -0,0 +1,19 @@ +rem Copyright (c) 2007, International Business Machines Corporation and +rem others. All Rights Reserved. + +set PERF=c:\svn\icuproj\icu\ucnvutf8\source\test\perf\unisetperf\release\unisetperf +rem types: slow Bv Bv0 B0 +rem --pattern [:White_Space:] + +for %%f in (udhr_eng.txt + udhr_deu.txt + udhr_fra.txt + udhr_rus.txt + udhr_tha.txt + udhr_jpn.txt + udhr_cmn.txt + udhr_jpn.html) do ( + for %%t in (slow Bv Bv0) do ( + %PERF% SpanUTF16 --type %%t -f \temp\udhr\%%f --pattern [:White_Space:] -v -e UTF-8 --passes 3 --iterations 10000 + ) +) diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh new file mode 100755 index 00000000000..8a647e31858 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span16perf.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Copyright (c) 2007, International Business Machines Corporation and +# others. All Rights Reserved. + +# Echo shell script commands. +set -ex + +PERF=test/perf/unisetperf/unisetperf +# slow Bv Bv0 B0 +# --pattern [:White_Space:] + +for file in udhr_eng.txt \ + udhr_deu.txt \ + udhr_fra.txt \ + udhr_rus.txt \ + udhr_tha.txt \ + udhr_jpn.txt \ + udhr_cmn.txt \ + udhr_jpn.html; do + for type in slow Bv Bv0; do + $PERF SpanUTF16 --type $type -f ~/udhr/$file -v -e UTF-8 --passes 3 --iterations 10000 + done +done diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat new file mode 100755 index 00000000000..611eaf633b8 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.bat @@ -0,0 +1,19 @@ +rem Copyright (c) 2007, International Business Machines Corporation and +rem others. All Rights Reserved. + +set PERF=c:\svn\icuproj\icu\ucnvutf8\source\test\perf\unisetperf\release\unisetperf +rem types: slow Bh bh Bv Bv0 B0 BvF Bvp BvpF L Bvl BvL +rem --pattern [:White_Space:] + +for %%f in (udhr_eng.txt + udhr_deu.txt + udhr_fra.txt + udhr_rus.txt + udhr_tha.txt + udhr_jpn.txt + udhr_cmn.txt + udhr_jpn.html) do ( + for %%t in (slow BvF BvpF Bvl BvL) do ( + %PERF% SpanUTF8 --type %%t -f \temp\udhr\%%f --pattern [:White_Space:] -v -e UTF-8 --passes 3 --iterations 10000 + ) +) diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh new file mode 100755 index 00000000000..b508320c3ef --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/span8perf.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Copyright (c) 2007, International Business Machines Corporation and +# others. All Rights Reserved. + +# Echo shell script commands. +set -ex + +PERF=test/perf/unisetperf/unisetperf +# slow Bh bh Bv Bv0 B0 BvF Bvp BvpF L Bvl BvL +# --pattern [:White_Space:] + +for file in udhr_eng.txt \ + udhr_deu.txt \ + udhr_fra.txt \ + udhr_rus.txt \ + udhr_tha.txt \ + udhr_jpn.txt \ + udhr_cmn.txt \ + udhr_jpn.html; do + for type in slow BvF BvpF Bvl BvL; do + $PERF SpanUTF8 --type $type -f ~/udhr/$file -v -e UTF-8 --passes 3 --iterations 10000 + done +done diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp new file mode 100644 index 00000000000..6c4720888c9 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/trieset.cpp @@ -0,0 +1,111 @@ +/* +********************************************************************** +* Copyright (C) 2007, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: trieset.cpp +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2007jan15 +* created by: Markus Scherer +* +* Idea for a "compiled", fast, read-only (immutable) version of a UnicodeSet +* using a UTrie with 8-bit (byte) results per code point. +* Modifies the trie index to make the BMP linear, and uses the original set +* for supplementary code points. +*/ + +#include "unicode/utypes.h" +#include "unicont.h" + +#define UTRIE_GET8_LATIN1(trie) ((const uint8_t *)(trie)->data32+UTRIE_DATA_BLOCK_LENGTH) + +#define UTRIE_GET8_FROM_LEAD(trie, c16) \ + ((const uint8_t *)(trie)->data32)[ \ + ((int32_t)((trie)->index[(c16)>>UTRIE_SHIFT])<<UTRIE_INDEX_SHIFT)+ \ + ((c16)&UTRIE_MASK) \ + ] + +class TrieSet : public UObject, public UnicodeContainable { +public: + TrieSet(const UnicodeSet &set, UErrorCode &errorCode) + : trieData(NULL), latin1(NULL), restSet(set.clone()) { + if(U_FAILURE(errorCode)) { + return; + } + if(restSet==NULL) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + return; + } + + UNewTrie *newTrie=utrie_open(NULL, NULL, 0x11000, 0, 0, TRUE); + UChar32 start, end; + + UnicodeSetIterator iter(set); + + while(iter.nextRange() && !iter.isString()) { + start=iter.getCodepoint(); + end=iter.getCodepointEnd(); + if(start>0xffff) { + break; + } + if(end>0xffff) { + end=0xffff; + } + if(!utrie_setRange32(newTrie, start, end+1, TRUE, TRUE)) { + errorCode=U_INTERNAL_PROGRAM_ERROR; + return; + } + } + + // Preflight the trie length. + int32_t length=utrie_serialize(newTrie, NULL, 0, NULL, 8, &errorCode); + if(errorCode!=U_BUFFER_OVERFLOW_ERROR) { + return; + } + + trieData=(uint32_t *)uprv_malloc(length); + if(trieData==NULL) { + errorCode=U_MEMORY_ALLOCATION_ERROR; + return; + } + + errorCode=U_ZERO_ERROR; + utrie_serialize(newTrie, trieData, length, NULL, 8, &errorCode); + utrie_unserialize(&trie, trieData, length, &errorCode); // TODO: Implement for 8-bit UTrie! + + if(U_SUCCESS(errorCode)) { + // Copy the indexes for surrogate code points into the BMP range + // for simple access across the entire BMP. + uprv_memcpy((uint16_t *)trie.index+(0xd800>>UTRIE_SHIFT), + trie.index+UTRIE_BMP_INDEX_LENGTH, + (0x800>>UTRIE_SHIFT)*2); + latin1=UTRIE_GET8_LATIN1(&trie); + } + + restSet.remove(0, 0xffff); + } + + ~TrieSet() { + uprv_free(trieData); + delete restSet; + } + + UBool contains(UChar32 c) const { + if((uint32_t)c<=0xff) { + return (UBool)latin1[c]; + } else if((uint32_t)c<0xffff) { + return (UBool)UTRIE_GET8_FROM_LEAD(&trie, c); + } else { + return restSet->contains(c); + } + } + +private: + uint32_t *trieData; + const uint8_t *latin1; + UTrie trie; + UnicodeSet *restSet; +}; diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h new file mode 100644 index 00000000000..2e8a64e8cd9 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/draft/unicont.h @@ -0,0 +1,34 @@ +/* +********************************************************************** +* Copyright (C) 2007, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: unicont.h +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2007jan15 +* created by: Markus Scherer +* +* Idea for new common interface underneath the normal UnicodeSet +* and other classes, such as "compiled", fast, read-only (immutable) +* versions of UnicodeSet. +*/ + +class UnicodeContainable { +public: + virtual ~UnicodeContainable() {} + + virtual UBool contains(UChar32 c) const = 0; + + virtual int32_t span(const UChar *s, int32_t length); + + virtual int32_t spanNot(const UChar *s, int32_t length); + + virtual int32_t spanUTF8(const UChar *s, int32_t length); + + virtual int32_t spanNotUTF8(const UChar *s, int32_t length); + + virtual UClassID getDynamicClassID(void) const; +}; diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp new file mode 100644 index 00000000000..36d61c1e193 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.cpp @@ -0,0 +1,441 @@ +/* +********************************************************************** +* Copyright (C) 2007, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* file name: unisetperf.cpp +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2007jan31 +* created by: Markus Scherer +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "unicode/uperf.h" +#include "unicode/uniset.h" +#include "unicode/unistr.h" +#include "uoptions.h" + +#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) + +// Command-line options specific to unisetperf. +// Options do not have abbreviations: Force readable command lines. +// (Using U+0001 for abbreviation characters.) +enum { + SET_PATTERN, + FAST_TYPE, + UNISETPERF_OPTIONS_COUNT +}; + +static UOption options[UNISETPERF_OPTIONS_COUNT]={ + UOPTION_DEF("pattern", '\x01', UOPT_REQUIRES_ARG), + UOPTION_DEF("type", '\x01', UOPT_REQUIRES_ARG) +}; + +static const char *const unisetperf_usage = + "\t--pattern UnicodeSet pattern for instantiation.\n" + "\t Default: [:ID_Continue:]\n" + "\t--type Type of UnicodeSet: slow fast\n" + "\t Default: slow\n"; + +// Test object with setup data. +class UnicodeSetPerformanceTest : public UPerfTest { +public: + UnicodeSetPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status) + : UPerfTest(argc, argv, options, LENGTHOF(options), unisetperf_usage, status), + utf8(NULL), utf8Length(0), countInputCodePoints(0), spanCount(0) { + if (U_SUCCESS(status)) { + UnicodeString pattern=UnicodeString(options[SET_PATTERN].value, -1, US_INV).unescape(); + set.applyPattern(pattern, status); + prefrozen=set; + if(0==strcmp(options[FAST_TYPE].value, "fast")) { + set.freeze(); + } + + int32_t inputLength; + UPerfTest::getBuffer(inputLength, status); + if(U_SUCCESS(status) && inputLength>0) { + countInputCodePoints = u_countChar32(buffer, bufferLen); + + countSpans(); + + // Preflight the UTF-8 length and allocate utf8. + u_strToUTF8(NULL, 0, &utf8Length, buffer, bufferLen, &status); + if(status==U_BUFFER_OVERFLOW_ERROR) { + utf8=(char *)malloc(utf8Length); + if(utf8!=NULL) { + status=U_ZERO_ERROR; + u_strToUTF8(utf8, utf8Length, NULL, buffer, bufferLen, &status); + } else { + status=U_MEMORY_ALLOCATION_ERROR; + } + } + + if(verbose) { + printf("code points:%ld len16:%ld len8:%ld spans:%ld " + "cp/span:%.3g UChar/span:%.3g B/span:%.3g B/cp:%.3g\n", + (long)countInputCodePoints, (long)bufferLen, (long)utf8Length, (long)spanCount, + (double)countInputCodePoints/spanCount, (double)bufferLen/spanCount, (double)utf8Length/spanCount, + (double)utf8Length/countInputCodePoints); + } + } + } + } + + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL); + + // Count spans of characters that are in the set, + // and spans of characters that are not in the set. + // If the very first character is in the set, then one additional + // not-span is counted. + void countSpans() { + const UChar *s=getBuffer(); + int32_t length=getBufferLen(); + int32_t i=0; + UBool tf=FALSE; + while(i<length) { + i=span(s, length, i, tf); + tf=(UBool)(!tf); + ++spanCount; + } + } + int32_t span(const UChar *s, int32_t length, int32_t start, UBool tf) const { + UChar32 c; + int32_t prev; + while((prev=start)<length) { + U16_NEXT(s, start, length, c); + if(tf!=set.contains(c)) { + break; + } + } + return prev; + } + + const UChar *getBuffer() const { return buffer; } + int32_t getBufferLen() const { return bufferLen; } + + char *utf8; + int32_t utf8Length; + + // Number of code points in the input text. + int32_t countInputCodePoints; + int32_t spanCount; + + UnicodeSet set; + UnicodeSet prefrozen; +}; + +// Performance test function object. +class Command : public UPerfFunction { +protected: + Command(const UnicodeSetPerformanceTest &testcase) : testcase(testcase) {} + +public: + virtual ~Command() {} + + // virtual void call(UErrorCode* pErrorCode) { ... } + + virtual long getOperationsPerIteration() { + // Number of code points tested: + // Input code points, plus one for the end of each span except the last span. + return testcase.countInputCodePoints+testcase.spanCount-1; + } + + virtual long getEventsPerIteration() { + return testcase.spanCount; + } + + const UnicodeSetPerformanceTest &testcase; +}; + +class Contains : public Command { +protected: + Contains(const UnicodeSetPerformanceTest &testcase) : Command(testcase) { + // Verify that the frozen set is equal to the unfrozen one. + UnicodeSet set; + UChar32 c; + + for(c=0; c<=0x10ffff; ++c) { + if(testcase.set.contains(c)) { + set.add(c); + } + } + if(set!=testcase.set) { + fprintf(stderr, "error: frozen set != original!\n"); + } + } +public: + static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) { + return new Contains(testcase); + } + virtual void call(UErrorCode* pErrorCode) { + const UnicodeSet &set=testcase.set; + const UChar *s=testcase.getBuffer(); + int32_t length=testcase.getBufferLen(); + int32_t count=0; + int32_t i=0; + UBool tf=FALSE; + while(i<length) { + i+=span(set, s+i, length-i, tf); + tf=(UBool)(!tf); + ++count; + } + if(count!=testcase.spanCount) { + fprintf(stderr, "error: Contains() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n", + (long)count, (long)testcase.spanCount); + } + } + static int32_t span(const UnicodeSet &set, const UChar *s, int32_t length, UBool tf) { + UChar32 c; + int32_t start=0, prev; + while((prev=start)<length) { + U16_NEXT(s, start, length, c); + if(tf!=set.contains(c)) { + break; + } + } + return prev; + } +}; + +class SpanUTF16 : public Command { +protected: + SpanUTF16(const UnicodeSetPerformanceTest &testcase) : Command(testcase) { + // Verify that the frozen set is equal to the unfrozen one. + UnicodeSet set; + UChar utf16[2]; + UChar32 c, c2; + + for(c=0; c<=0xffff; ++c) { + utf16[0]=(UChar)c; + if(testcase.set.span(utf16, 1, USET_SPAN_CONTAINED)>0) { + set.add(c); + } + } + for(c=0xd800; c<=0xdbff; ++c) { + utf16[0]=(UChar)c; + for(c2=0xdc00; c2<=0xdfff; ++c2) { + utf16[1]=(UChar)c2; + if(testcase.set.span(utf16, 2, USET_SPAN_CONTAINED)>0) { + set.add(U16_GET_SUPPLEMENTARY(c, c2)); + } + } + } + + if(set!=testcase.set) { + fprintf(stderr, "error: frozen set != original!\n"); + } + } +public: + static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) { + return new SpanUTF16(testcase); + } + virtual void call(UErrorCode* pErrorCode) { + const UnicodeSet &set=testcase.set; + const UChar *s=testcase.getBuffer(); + int32_t length=testcase.getBufferLen(); + int32_t count=0; + int32_t i=0; + UBool tf=FALSE; + while(i<length) { + i+=set.span(s+i, length-i, (USetSpanCondition)tf); + tf=(UBool)(!tf); + ++count; + } + if(count!=testcase.spanCount) { + fprintf(stderr, "error: SpanUTF16() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n", + (long)count, (long)testcase.spanCount); + } + } +}; + +class SpanBackUTF16 : public Command { +protected: + SpanBackUTF16(const UnicodeSetPerformanceTest &testcase) : Command(testcase) { + // Verify that the frozen set is equal to the unfrozen one. + UnicodeSet set; + UChar utf16[2]; + UChar32 c, c2; + + for(c=0; c<=0xffff; ++c) { + utf16[0]=(UChar)c; + if(testcase.set.spanBack(utf16, 1, USET_SPAN_CONTAINED)==0) { + set.add(c); + } + } + for(c=0xd800; c<=0xdbff; ++c) { + utf16[0]=(UChar)c; + for(c2=0xdc00; c2<=0xdfff; ++c2) { + utf16[1]=(UChar)c2; + if(testcase.set.spanBack(utf16, 2, USET_SPAN_CONTAINED)==0) { + set.add(U16_GET_SUPPLEMENTARY(c, c2)); + } + } + } + + if(set!=testcase.set) { + fprintf(stderr, "error: frozen set != original!\n"); + } + } +public: + static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) { + return new SpanBackUTF16(testcase); + } + virtual void call(UErrorCode* pErrorCode) { + const UnicodeSet &set=testcase.set; + const UChar *s=testcase.getBuffer(); + int32_t length=testcase.getBufferLen(); + int32_t count=0; + /* + * Get the same spans as with span() where we always start with a not-contained span. + * If testcase.spanCount is an odd number, then the last span() was not-contained. + * The last spanBack() must be not-contained to match the first span(). + */ + UBool tf=(UBool)((testcase.spanCount&1)==0); + while(length>0 || !tf) { + length=set.spanBack(s, length, (USetSpanCondition)tf); + tf=(UBool)(!tf); + ++count; + } + if(count!=testcase.spanCount) { + fprintf(stderr, "error: SpanBackUTF16() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n", + (long)count, (long)testcase.spanCount); + } + } +}; + +class SpanUTF8 : public Command { +protected: + SpanUTF8(const UnicodeSetPerformanceTest &testcase) : Command(testcase) { + // Verify that the frozen set is equal to the unfrozen one. + UnicodeSet set; + char utf8[4]; + UChar32 c; + int32_t length; + + for(c=0; c<=0x10ffff; ++c) { + if(c==0xd800) { + c=0xe000; + } + length=0; + U8_APPEND_UNSAFE(utf8, length, c); + if(testcase.set.spanUTF8(utf8, length, USET_SPAN_CONTAINED)>0) { + set.add(c); + } + } + if(set!=testcase.set) { + fprintf(stderr, "error: frozen set != original!\n"); + } + } +public: + static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) { + return new SpanUTF8(testcase); + } + virtual void call(UErrorCode* pErrorCode) { + const UnicodeSet &set=testcase.set; + const char *s=testcase.utf8; + int32_t length=testcase.utf8Length; + int32_t count=0; + int32_t i=0; + UBool tf=FALSE; + while(i<length) { + i+=set.spanUTF8(s+i, length-i, (USetSpanCondition)tf); + tf=(UBool)(!tf); + ++count; + } + if(count!=testcase.spanCount) { + fprintf(stderr, "error: SpanUTF8() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n", + (long)count, (long)testcase.spanCount); + } + } +}; + +class SpanBackUTF8 : public Command { +protected: + SpanBackUTF8(const UnicodeSetPerformanceTest &testcase) : Command(testcase) { + // Verify that the frozen set is equal to the unfrozen one. + UnicodeSet set; + char utf8[4]; + UChar32 c; + int32_t length; + + for(c=0; c<=0x10ffff; ++c) { + if(c==0xd800) { + c=0xe000; + } + length=0; + U8_APPEND_UNSAFE(utf8, length, c); + if(testcase.set.spanBackUTF8(utf8, length, USET_SPAN_CONTAINED)==0) { + set.add(c); + } + } + if(set!=testcase.set) { + fprintf(stderr, "error: frozen set != original!\n"); + } + } +public: + static UPerfFunction* get(const UnicodeSetPerformanceTest &testcase) { + return new SpanBackUTF8(testcase); + } + virtual void call(UErrorCode* pErrorCode) { + const UnicodeSet &set=testcase.set; + const char *s=testcase.utf8; + int32_t length=testcase.utf8Length; + int32_t count=0; + /* + * Get the same spans as with span() where we always start with a not-contained span. + * If testcase.spanCount is an odd number, then the last span() was not-contained. + * The last spanBack() must be not-contained to match the first span(). + */ + UBool tf=(UBool)((testcase.spanCount&1)==0); + while(length>0 || !tf) { + length=set.spanBackUTF8(s, length, (USetSpanCondition)tf); + tf=(UBool)(!tf); + ++count; + } + if(count!=testcase.spanCount) { + fprintf(stderr, "error: SpanBackUTF8() count=%ld != %ld=UnicodeSetPerformanceTest.spanCount\n", + (long)count, (long)testcase.spanCount); + } + } +}; + +UPerfFunction* UnicodeSetPerformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) { + switch (index) { + case 0: name = "Contains"; if (exec) return Contains::get(*this); break; + case 1: name = "SpanUTF16"; if (exec) return SpanUTF16::get(*this); break; + case 2: name = "SpanBackUTF16";if (exec) return SpanBackUTF16::get(*this); break; + case 3: name = "SpanUTF8"; if (exec) return SpanUTF8::get(*this); break; + case 4: name = "SpanBackUTF8"; if (exec) return SpanBackUTF8::get(*this); break; + default: name = ""; break; + } + return NULL; +} + +int main(int argc, const char *argv[]) +{ + // Default values for command-line options. + options[SET_PATTERN].value = "[:ID_Continue:]"; + options[FAST_TYPE].value = "slow"; + + UErrorCode status = U_ZERO_ERROR; + UnicodeSetPerformanceTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + test.usage(); + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run, please check the " + "arguments.\n"); + return 1; + } + + return 0; +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl new file mode 100755 index 00000000000..18f83b8e070 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.pl @@ -0,0 +1,76 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005-2007, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; +use lib '../perldriver'; +use PerfFramework; + +my $options = { + "title"=>"UnicodeSet span()/contains() performance", + "headers"=>"Bv Bv0", + "operationIs"=>"tested Unicode code point", + "passes"=>"3", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"/temp/udhr", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "Release/unisetperf.exe -e UTF-8"; +my $pc = "$p Contains"; +my $p16 = "$p SpanUTF16"; +my $p8 = "$p SpanUTF8"; + +my $tests = { + "Contains", ["$pc --type Bv", + "$pc --type Bv0" + ], + "SpanUTF16", ["$p16 --type Bv", + "$p16 --type Bv0" + ] + }; + +my $dataFiles = { + "", + [ + "udhr_eng.txt", + "udhr_deu.txt", + "udhr_fra.txt", + "udhr_rus.txt", + "udhr_tha.txt", + "udhr_jpn.txt", + "udhr_cmn.txt", + "udhr_jpn.html" + ] + }; + +runTests($options, $tests, $dataFiles); + +$options = { + "title"=>"UnicodeSet span()/contains() performance", + "headers"=>"Bv BvF Bvp BvpF L Bvl", + "operationIs"=>"tested Unicode code point", + "passes"=>"3", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"/temp/udhr", + "outputDir"=>"../results" + }; + +$tests = { + "SpanUTF8", ["$p8 --type Bv", + "$p8 --type BvF", + "$p8 --type Bvp", + "$p8 --type BvpF", + "$p8 --type L", + "$p8 --type Bvl" + ] + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj new file mode 100644 index 00000000000..4a281ef978e --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/unisetperf/unisetperf.vcproj @@ -0,0 +1,209 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="unisetperf" + ProjectGUID="{E7728E98-0469-AF37-43F4-4529A3D52C6B}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/unisetperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/unisetperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="4" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib" + OutputFile=".\Debug/unisetperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/unisetperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/unisetperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/unisetperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + OutputFile=".\Release/unisetperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/unisetperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath=".\unisetperf.cpp" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in new file mode 100644 index 00000000000..3e737304748 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/usetperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/usetperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = usetperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = usetperf.o bitset.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl new file mode 100755 index 00000000000..8c493806e20 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/UsetPerf.pl @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Uset performance: ICU", + "headers"=>"ICU", + "operationIs"=>"unicode string", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"../data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "debug/usetperf.exe "; + +my $tests = { + "titlecase_letter/add", ["$p titlecase_letter_add"], + "titlecase_letter/contains", ["$p titlecase_letter_contains"], + "titlecase_letter/iterator", ["$p titlecase_letter_iterator"], + "unassigned/add", ["$p unassigned_add"], + "unassigned/contains", ["$p unassigned_contains"], + "unassigned/iterator", ["$p unassigned_iterator"], + "pattern1", ["$p pattern1"], + "pattern2", ["$p pattern2"], + "pattern3", ["$p pattern3"], + }; + +my $dataFiles = { + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp new file mode 100644 index 00000000000..ea5f11b8b2f --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.cpp @@ -0,0 +1,63 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* 2002-09-20 aliu Created. +*/ + +#include "unicode/utypes.h" +#include "cmemory.h" +#include "bitset.h" + +// TODO: have a separate capacity, so the len can just be set to +// zero in the clearAll() method, and growth can be smarter. + +const int32_t SLOP = 8; + +const int32_t BYTES_PER_WORD = sizeof(int32_t); + +BitSet::BitSet() { + len = SLOP; + data = (int32_t*) uprv_malloc(len * BYTES_PER_WORD); + clearAll(); +} + +BitSet::~BitSet() { + uprv_free(data); +} + +UBool BitSet::get(int32_t bitIndex) const { + uint32_t longIndex = bitIndex >> 5; + int32_t bitInLong = bitIndex & 0x1F; + return (longIndex < len) ? (((data[longIndex] >> bitInLong) & 1) != 0) + : FALSE; +} + +void BitSet::set(int32_t bitIndex) { + uint32_t longIndex = bitIndex >> 5; + int32_t bitInLong = bitIndex & 0x1F; + if (longIndex >= len) { + ensureCapacity(longIndex+1); + } + data[longIndex] |= (1 << bitInLong); +} + +void BitSet::clearAll() { + for (uint32_t i=0; i<len; ++i) data[i] = 0; +} + +void BitSet::ensureCapacity(uint32_t minLen) { + uint32_t newLen = len; + while (newLen < minLen) newLen <<= 1; // grow exponentially + int32_t* newData = (int32_t*) uprv_malloc(newLen * BYTES_PER_WORD); + uprv_memcpy(newData, data, len * BYTES_PER_WORD); + uprv_free(data); + data = newData; + int32_t* p = data + len; + int32_t* limit = data + newLen; + while (p < limit) *p++ = 0; + len = newLen; +} + +//eof diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h new file mode 100644 index 00000000000..3148b1d7070 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/bitset.h @@ -0,0 +1,38 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* 2002-09-20 aliu Created. +*/ +#ifndef __BITSET_H__ +#define __BITSET_H__ + +#include "unicode/utypes.h" + +/** + * A simple, limited clone of the java.util.BitSet. + */ +class BitSet { + + uint32_t len; + int32_t* data; + + void ensureCapacity(uint32_t minLen); + +public: + + BitSet(); + ~BitSet(); + + UBool get(int32_t bitIndex) const; + + void set(int32_t bitIndex); + + // Non-java + void clearAll(); + + // TODO add other methods as needed. +}; + +#endif diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp new file mode 100644 index 00000000000..c75406a1ec4 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.cpp @@ -0,0 +1,143 @@ +/* +********************************************************************** +* Copyright (c) 2002-2005, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* 2005Nov22 Raymond Yang +* +* migrate old test created by aliu to perf test framework. +*/ + +#include <stdio.h> + +#include "unicode/utypes.h" +#include "unicode/uniset.h" +#include "unicode/uchar.h" +#include "unicode/usetiter.h" +#include "bitset.h" +#include "unicode/uperf.h" + +static const char* PAT[] = { + "['A-Za-z\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E1\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u01FB\\u0200-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u212A-\\u212B]", + + "['.0-9A-Za-z~\\u00C0-\\u00C5\\u00C7-\\u00CF\\u00D1-\\u00D6\\u00D9-\\u00DD\\u00E0-\\u00E5\\u00E7-\\u00EF\\u00F1-\\u00F6\\u00F9-\\u00FD\\u00FF-\\u010F\\u0112-\\u0125\\u0128-\\u0130\\u0134-\\u0137\\u0139-\\u013E\\u0143-\\u0148\\u014C-\\u0151\\u0154-\\u0165\\u0168-\\u017E\\u01A0-\\u01A1\\u01AF-\\u01B0\\u01CD-\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01ED\\u01F0\\u01F4-\\u01F5\\u01F8-\\u021B\\u021E-\\u021F\\u0226-\\u0233\\u0301\\u0303-\\u0304\\u0306-\\u0307\\u0310\\u0314-\\u0315\\u0323\\u0325\\u0331\\u0341\\u0344\\u0385-\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u0390\\u03AC-\\u03B0\\u03CC-\\u03CE\\u03D3\\u0403\\u040C\\u040E\\u0419\\u0439\\u0453\\u045C\\u045E\\u04C1-\\u04C2\\u04D0-\\u04D1\\u04D6-\\u04D7\\u04E2-\\u04E3\\u04EE-\\u04EF\\u1E00-\\u1E99\\u1EA0-\\u1EF9\\u1F01\\u1F03-\\u1F05\\u1F07\\u1F09\\u1F0B-\\u1F0D\\u1F0F\\u1F11\\u1F13-\\u1F15\\u1F19\\u1F1B-\\u1F1D\\u1F21\\u1F23-\\u1F25\\u1F27\\u1F29\\u1F2B-\\u1F2D\\u1F2F\\u1F31\\u1F33-\\u1F35\\u1F37\\u1F39\\u1F3B-\\u1F3D\\u1F3F\\u1F41\\u1F43-\\u1F45\\u1F49\\u1F4B-\\u1F4D\\u1F51\\u1F53-\\u1F55\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F61\\u1F63-\\u1F65\\u1F67\\u1F69\\u1F6B-\\u1F6D\\u1F6F\\u1F71\\u1F73\\u1F75\\u1F77\\u1F79\\u1F7B\\u1F7D\\u1F81\\u1F83-\\u1F85\\u1F87\\u1F89\\u1F8B-\\u1F8D\\u1F8F\\u1F91\\u1F93-\\u1F95\\u1F97\\u1F99\\u1F9B-\\u1F9D\\u1F9F\\u1FA1\\u1FA3-\\u1FA5\\u1FA7\\u1FA9\\u1FAB-\\u1FAD\\u1FAF-\\u1FB1\\u1FB4\\u1FB8-\\u1FB9\\u1FBB\\u1FC4\\u1FC9\\u1FCB\\u1FCE\\u1FD0-\\u1FD1\\u1FD3\\u1FD8-\\u1FD9\\u1FDB\\u1FDE\\u1FE0-\\u1FE1\\u1FE3\\u1FE5\\u1FE8-\\u1FE9\\u1FEB-\\u1FEC\\u1FEE\\u1FF4\\u1FF9\\u1FFB\\u212A-\\u212B\\uE04D\\uE064]", + + "[\\u0901-\\u0903\\u0905-\\u0939\\u093C-\\u094D\\u0950-\\u0954\\u0958-\\u096F]", +}; + +class CmdPattern : public UPerfFunction { +private: + UnicodeString pat; + UnicodeSet set; +public: + CmdPattern(const char * pattern):pat(pattern,""){ + } + virtual long getOperationsPerIteration(){ + return 1; + } + virtual void call(UErrorCode* pErrorCode){ + set.applyPattern(pat, *pErrorCode); + } +}; + +class CmdOp : public UPerfFunction { +private: + UnicodeSet us; + BitSet bs; + int32_t total; + void (CmdOp::*op) (); +public: + CmdOp(UCharCategory prop, void (CmdOp::*op)()):op(op){ + total = 0; + bs.clearAll(); + for (UChar32 cp=0; cp<0x110000; ++cp) { + if (u_charType(cp) == prop) { + bs.set((int32_t) cp); + ++total; + } + } + } + virtual long getOperationsPerIteration(){ + return total; + } + + virtual void call(UErrorCode* pErrorCode){ + (this->*op)(); + } + void add (void){ + us.clear(); + for (UChar32 cp=0; cp<0x110000; ++cp) { + if (bs.get((int32_t) cp)) { + us.add(cp); + } + } + } + + void contains(void){ + int32_t temp = 0; + us.clear(); + for (UChar32 cp=0; cp<0x110000; ++cp) { + if (us.contains(cp)) { + temp += cp; + } + } + } + + void iterator(void){ + int32_t temp = 0; + UnicodeSetIterator uit(us); + while (uit.next()) { + temp += uit.getCodepoint(); + } + } +}; + +class UsetPerformanceTest : public UPerfTest{ +public: + UsetPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status) :UPerfTest(argc,argv,status){ + } + + virtual UPerfFunction* runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ){ + switch (index) { + case 0: name = "titlecase_letter_add"; + if (exec) return new CmdOp(U_TITLECASE_LETTER, &CmdOp::add) ; break; + case 1: name = "titlecase_letter_contains"; + if (exec) return new CmdOp(U_TITLECASE_LETTER, &CmdOp::contains) ; break; + case 2: name = "titlecase_letter_iterator"; + if (exec) return new CmdOp(U_TITLECASE_LETTER, &CmdOp::iterator) ; break; + case 3: name = "unassigned_add"; + if (exec) return new CmdOp(U_UNASSIGNED, &CmdOp::add) ; break; + case 4: name = "unassigned_contains"; + if (exec) return new CmdOp(U_UNASSIGNED, &CmdOp::contains) ; break; + case 5: name = "unassigned_iterator"; + if (exec) return new CmdOp(U_UNASSIGNED, &CmdOp::iterator) ; break; + case 6: name = "pattern1"; + if (exec) return new CmdPattern(PAT[0]) ; break; + case 7: name = "pattern2"; + if (exec) return new CmdPattern(PAT[1]) ; break; + case 8: name = "pattern3"; + if (exec) return new CmdPattern(PAT[2]) ; break; + default: name = ""; break; + } + return NULL; + } +}; + + +int main(int argc, const char *argv[]) +{ + UErrorCode status = U_ZERO_ERROR; + UsetPerformanceTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + return 0; +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj new file mode 100644 index 00000000000..c128b0487bc --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/usetperf/usetperf.vcproj @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="usetperf" + ProjectGUID="{EC5DF28A-D789-4C46-A55D-0AD55B50ECE8}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/usetperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/usetperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib winmm.lib icutest.lib" + OutputFile=".\Release/usetperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib" + ProgramDatabaseFile=".\Release/usetperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/usetperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/usetperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib" + OutputFile=".\Debug/usetperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/usetperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="bitset.cpp" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + <File + RelativePath="usetperf.cpp" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\common" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath=".\bitset.h" + > + </File> + <File + RelativePath=".\timer.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in new file mode 100644 index 00000000000..08bf330d82d --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/ustrperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/ustrperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = ustrperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = stringperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl new file mode 100755 index 00000000000..02cde457e0f --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf.pl @@ -0,0 +1,68 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2003-2004, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Unicode String performance: ICU vs. STDLib", + "headers"=>"StdLib ICU", + "operationIs"=>"Unicode String", + "timePerOperationIs"=>"Time per Unicode String", + "passes"=>"5", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"../results" + }; + + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "stringperf.exe -l -u"; + +my $tests = { +"Object Construction(empty string)", ["$p TestStdLibCtor" , "$p TestCtor" ], +"Object Construction(single char)", ["$p TestStdLibCtor1" , "$p TestCtor1" ], +"Object Construction(another string)", ["$p TestStdLibCtor2" , "$p TestCtor2" ], +"Object Construction(string literal)", ["$p TestStdLibCtor3" , "$p TestCtor3" ], +"String Assignment(helper)", ["$p TestStdLibAssign" , "$p TestAssign" ], +"String Assignment(string literal)", ["$p TestStdLibAssign1" , "$p TestAssign1" ], +"String Assignment(another string)", ["$p TestStdLibAssign2" , "$p TestAssign2" ], +"Get String or Character", ["$p TestStdLibGetch" , "$p TestGetch" ], +"Concatenation", ["$p TestStdLibCatenate" , "$p TestCatenate" ], +"String Scanning(char)", ["$p TestStdLibScan" , "$p TestScan" ], +"String Scanning(string)", ["$p TestStdLibScan1" , "$p TestScan1" ], +"String Scanning(char set)", ["$p TestStdLibScan2" , "$p TestScan2" ], +}; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Simplified_Chinese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", + "th18057.txt", + ] + }; + +runTests($options, $tests, $dataFiles); + +# The whole command line would be something like: +# stringperf.exe -p 5 -t 2 -f c:/src/data/perf/TestNames_Asian.txt -l -u TestStdLibCatenate
\ No newline at end of file diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl new file mode 100644 index 00000000000..4a1ffa86420 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/StringPerf_r.pl @@ -0,0 +1,70 @@ +#!/usr/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2002-2007, International Business Machines +# * Corporation and others. All Rights Reserved. +# ******************************************************************** + +use strict; + +#Assume we are running outside of the ICU source +use lib './ICU-3.0/ICU/source/test/perf/perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Unicode String performance regression (ICU 2.8 and 3.0)", + "headers"=>"ICU28 ICU30", + "operationIs"=>"Unicode String", + "passes"=>"10", + "time"=>"5", + #"outputType"=>"HTML", + "dataDir"=>"c:/src/perf/data", + "outputDir"=>"results_ICU4C" + }; + +# programs + +my $p1 = "icu-2.8/icu/bin/stringperf28.exe -b -u"; +my $p2 = "icu-3.0/icu/bin/stringperf30.exe -b -u"; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Japanese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", +# "th18057.txt", +# "thesis.txt", +# "vfear11a.txt", + ] + }; + + +my $tests = { +"Object Construction(empty string)", ["$p1 TestCtor" , "$p2 TestCtor" ], +"Object Construction(single char)", ["$p1 TestCtor1" , "$p2 TestCtor1" ], +"Object Construction(another string)", ["$p1 TestCtor2" , "$p2 TestCtor2" ], +"Object Construction(string literal)", ["$p1 TestCtor3" , "$p2 TestCtor3" ], +"String Assignment(helper)", ["$p1 TestAssign" , "$p2 TestAssign" ], +"String Assignment(string literal)", ["$p1 TestAssign1" , "$p2 TestAssign1" ], +"String Assignment(another string)", ["$p1 TestAssign2" , "$p2 TestAssign2" ], +"Get String or Character", ["$p1 TestGetch" , "$p2 TestGetch" ], +"Concatenation", ["$p1 TestCatenate" , "$p2 TestCatenate" ], +"String Scanning(char)", ["$p1 TestScan" , "$p2 TestScan" ], +"String Scanning(string)", ["$p1 TestScan1" , "$p2 TestScan1" ], +"String Scanning(char set)", ["$p1 TestScan2" , "$p2 TestScan2" ], +}; + + +runTests($options, $tests, $dataFiles); + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp new file mode 100644 index 00000000000..342e060aa8c --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.cpp @@ -0,0 +1,377 @@ +/******************************************************************** + * COPYRIGHT: + * Copyright (C) 2002-2006 International Business Machines Corporation + * and others. All Rights Reserved. + * + ********************************************************************/ +/***************************************************************************** +* File stringperf.cpp +* +* Modification History: +* Name Description +* Doug Wang Second version +* Doug Wang First Version +****************************************************************************** +*/ + +/** + * This program tests UnicodeString performance. + * APIs tested: UnicodeString + * ICU4C + * Windows 2000/XP, Linux + */ + +#include "stringperf.h" + + +int main(int argc, const char *argv[]) +{ + UErrorCode status = U_ZERO_ERROR; + + bCatenatePrealloc=TRUE; + + StringPerformanceTest test(argc, argv, status); + if (U_FAILURE(status)){ + return status; + } + + int loops = LOOPS; + if (bCatenatePrealloc) { + int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN); + catICU = new UnicodeString(to_alloc,'a',0); + //catICU = new UnicodeString(); + + catStd = new stlstring(); + catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN)); + //catStd -> reserve(110000000); + } else { + catICU = new UnicodeString(); + catStd = new stlstring(); + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + + delete catICU; + delete catStd; + return 0; +} + +StringPerformanceTest::StringPerformanceTest(int32_t argc, const char *argv[], + UErrorCode &status) + : UPerfTest(argc, argv, status) +{ + filelines_=NULL; + StrBuffer=NULL; + StrBufferLen=0; + + int32_t len =0; + + if (status== U_ILLEGAL_ARGUMENT_ERROR){ + //fprintf(stderr,gUsageString, "stringperf"); + return; + } + if (U_FAILURE(status)){ + fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", + u_errorName(status)); + return; + } + + + if(line_mode){ + ULine* filelines = getLines(status); + if(U_FAILURE(status)){ + fprintf(stderr, "FAILED to read lines from file and create UPerfTest object. Error: %s\n", u_errorName(status)); + return; + } + + filelines_ = new ULine[numLines]; + for (int i =0; i < numLines; i++) { + len = filelines[i].len; + filelines_[i].name = new UChar[len]; + filelines_[i].len = len; + memcpy(filelines_[i].name, filelines[i].name, len * U_SIZEOF_UCHAR); + } + + }else if(bulk_mode){ + int32_t srcLen = 0; + const UChar* src = getBuffer(srcLen,status); + if(U_FAILURE(status)){ + fprintf(stderr, "FAILED to read buffer from file and create UPerfTest object. Error: %s\n", u_errorName(status)); + return; + } + + StrBuffer = new UChar[srcLen]; + StrBufferLen = srcLen; + memcpy(StrBuffer, src, srcLen * U_SIZEOF_UCHAR); + + } +} + +StringPerformanceTest::~StringPerformanceTest() +{ + delete[] filelines_; + delete[] StrBuffer; +} + +UPerfFunction* StringPerformanceTest::runIndexedTest(int32_t index, UBool exec, + const char *&name, + char* par) +{ + switch (index) { + TESTCASE(0, TestCtor); + TESTCASE(1, TestCtor1); + TESTCASE(2, TestCtor2); + TESTCASE(3, TestCtor3); + TESTCASE(4, TestAssign); + TESTCASE(5, TestAssign1); + TESTCASE(6, TestAssign2); + TESTCASE(7, TestGetch); + TESTCASE(8, TestCatenate); + TESTCASE(9, TestScan); + TESTCASE(10, TestScan1); + TESTCASE(11, TestScan2); + + TESTCASE(12, TestStdLibCtor); + TESTCASE(13, TestStdLibCtor1); + TESTCASE(14, TestStdLibCtor2); + TESTCASE(15, TestStdLibCtor3); + TESTCASE(16, TestStdLibAssign); + TESTCASE(17, TestStdLibAssign1); + TESTCASE(18, TestStdLibAssign2); + TESTCASE(19, TestStdLibGetch); + TESTCASE(20, TestStdLibCatenate); + TESTCASE(21, TestStdLibScan); + TESTCASE(22, TestStdLibScan1); + TESTCASE(23, TestStdLibScan2); + + default: + name = ""; + return NULL; + } + return NULL; +} + +UPerfFunction* StringPerformanceTest::TestCtor() +{ + if (line_mode) { + return new StringPerfFunction(ctor, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestCtor1() +{ + if (line_mode) { + return new StringPerfFunction(ctor1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor1, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestCtor2() +{ + if (line_mode) { + return new StringPerfFunction(ctor2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor2, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestCtor3() +{ + if (line_mode) { + return new StringPerfFunction(ctor3, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(ctor3, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestAssign() +{ + if (line_mode) { + return new StringPerfFunction(assign, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(assign, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestAssign1() +{ + if (line_mode) { + return new StringPerfFunction(assign1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(assign1, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestAssign2() +{ + if (line_mode) { + return new StringPerfFunction(assign2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(assign2, StrBuffer, StrBufferLen, uselen); + } +} + + +UPerfFunction* StringPerformanceTest::TestGetch() +{ + if (line_mode) { + return new StringPerfFunction(getch, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(getch, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestCatenate() +{ + if (line_mode) { + return new StringPerfFunction(catenate, filelines_, numLines, uselen); + } else { + //return new StringPerfFunction(catenate, buffer, bufferLen, uselen); + return new StringPerfFunction(catenate, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestScan() +{ + if (line_mode) { + return new StringPerfFunction(scan, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(scan, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestScan1() +{ + if (line_mode) { + return new StringPerfFunction(scan1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(scan1, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestScan2() +{ + if (line_mode) { + return new StringPerfFunction(scan2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(scan2, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibCtor() +{ + if (line_mode) { + return new StringPerfFunction(StdLibCtor, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibCtor1() +{ + if (line_mode) { + return new StringPerfFunction(StdLibCtor1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor1, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibCtor2() +{ + if (line_mode) { + return new StringPerfFunction(StdLibCtor2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor2, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibCtor3() +{ + if (line_mode) { + return new StringPerfFunction(StdLibCtor3, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibCtor3, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibAssign() +{ + if (line_mode) { + return new StringPerfFunction(StdLibAssign, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibAssign, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibAssign1() +{ + if (line_mode) { + return new StringPerfFunction(StdLibAssign1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibAssign1, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibAssign2() +{ + if (line_mode) { + return new StringPerfFunction(StdLibAssign2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibAssign2, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibGetch() +{ + if (line_mode) { + return new StringPerfFunction(StdLibGetch, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibGetch, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibCatenate() +{ + if (line_mode) { + return new StringPerfFunction(StdLibCatenate, filelines_, numLines, uselen); + } else { + //return new StringPerfFunction(StdLibCatenate, buffer, bufferLen, uselen); + return new StringPerfFunction(StdLibCatenate, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibScan() +{ + if (line_mode) { + return new StringPerfFunction(StdLibScan, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibScan, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibScan1() +{ + if (line_mode) { + return new StringPerfFunction(StdLibScan1, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibScan1, StrBuffer, StrBufferLen, uselen); + } +} + +UPerfFunction* StringPerformanceTest::TestStdLibScan2() +{ + if (line_mode) { + return new StringPerfFunction(StdLibScan2, filelines_, numLines, uselen); + } else { + return new StringPerfFunction(StdLibScan2, StrBuffer, StrBufferLen, uselen); + } +} + + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h new file mode 100644 index 00000000000..84d6493a405 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.h @@ -0,0 +1,549 @@ +/* +********************************************************************** +* Copyright (c) 2002-2006, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +*/ +#ifndef _STRINGPERF_H +#define _STRINGPERF_H + +#include <string> + +#include "unicode/utypes.h" +#include "unicode/unistr.h" + +#include "unicode/uperf.h" + +typedef std::wstring stlstring; + +/* Define all constants for test case operations */ +#define MAXNUMLINES 40000 //Max number of lines in a test data file +#define MAXSRCLEN 20 //Max length of one line. maybe a larger number, but it need more mem +#define LOOPS 100 //Iterations +//#define LOOPS 10 +#define catenate_STRLEN 2 + +const UChar uTESTCHAR1 = 'a'; +const wchar_t wTESTCHAR1 = 'a'; +const UnicodeString uEMPTY; +const stlstring sEMPTY; +UnicodeString unistr; +stlstring stlstr; +// Simulate construction with a single-char string for basic_string +wchar_t simulate[2]={wTESTCHAR1, 0}; + +/* Constants for scan operation */ +U_STRING_DECL(scan_STRING, "Dot. 123. Some more data.", 25); +const UnicodeString uScan_STRING=UnicodeString(scan_STRING); +const stlstring sScan_STRING=stlstring(L"Dot. 123. Some more data."); + +/* global variables or constants for concatenation operation */ +U_STRING_DECL(uCatenate_STR, "!!", 2); +const stlstring sCatenate_STR=stlstring(L"!!"); +static UnicodeString* catICU; +static stlstring* catStd; +UBool bCatenatePrealloc; + +/* type defines */ +typedef struct WLine WLine; +struct WLine { + wchar_t name[100]; + int32_t len; +}; //struct to store one line of wchar_t string + +enum FnType { Fn_ICU, Fn_STD }; +typedef FnType FnType; +typedef void (*ICUStringPerfFn)(const UChar* src,int32_t srcLen, UnicodeString s0); +typedef void (*StdStringPerfFn)(const wchar_t* src,int32_t srcLen, stlstring s0); + + +class StringPerfFunction : public UPerfFunction +{ +public: + + virtual long getEventsPerIteration(){ + int loops = LOOPS; + if (catICU) { delete catICU;} + if (catStd) { delete catStd;} + + if (bCatenatePrealloc) { + + int to_alloc = loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN); + catICU = new UnicodeString(to_alloc,'a',0); + //catICU = new UnicodeString(); + + catStd = new stlstring(); + //catStd -> reserve(loops * MAXNUMLINES * (MAXSRCLEN + catenate_STRLEN)); + catStd -> reserve(110000000); + } else { + catICU = new UnicodeString(); + catStd = new stlstring(); + } + + return -1; + } + + virtual void call(UErrorCode* status) + { + if(line_mode_==TRUE){ + if(uselen_){ + for(int32_t i = 0; i< numLines_; i++){ + if (fnType_==Fn_ICU) { + (*fn1_)(lines_[i].name,lines_[i].len,uS0_[i]); + } else { + (*fn2_)(wlines_[i].name,wlines_[i].len,sS0_[i]); + } + } + }else{ + for(int32_t i = 0; i< numLines_; i++){ + if (fnType_==Fn_ICU) { + (*fn1_)(lines_[i].name,-1,uS0_[i]); + } else { + (*fn2_)(wlines_[i].name,-1,sS0_[i]); + } + } + } + }else{ + if(uselen_){ + if (fnType_==Fn_ICU) { + (*fn1_)(src_,srcLen_,*ubulk_); + } else { + (*fn2_)(wsrc_,wsrcLen_,*sbulk_); + } + }else{ + if (fnType_==Fn_ICU) { + (*fn1_)(src_,-1,*ubulk_); + } else { + (*fn2_)(wsrc_,-1,*sbulk_); + } + } + } + } + + virtual long getOperationsPerIteration() + { + if(line_mode_==TRUE){ + return numLines_; + }else{ + return 1; + } + } + + StringPerfFunction(ICUStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen) + { + + fn1_ = func; + lines_=srcLines; + wlines_=NULL; + numLines_=srcNumLines; + uselen_=uselen; + line_mode_=TRUE; + src_ = NULL; + srcLen_ = 0; + wsrc_ = NULL; + wsrcLen_ = 0; + fnType_ = Fn_ICU; + + uS0_=new UnicodeString[numLines_]; + for(int32_t i=0; i<numLines_; i++) { + uS0_[i]=UnicodeString(lines_[i].name, lines_[i].len); + } + sS0_=NULL; + ubulk_=NULL; + sbulk_=NULL; + } + + StringPerfFunction(StdStringPerfFn func, ULine* srcLines, int32_t srcNumLines, UBool uselen) + { + + fn2_ = func; + lines_=srcLines; + wlines_=NULL; + numLines_=srcNumLines; + uselen_=uselen; + line_mode_=TRUE; + src_ = NULL; + srcLen_ = 0; + wsrc_ = NULL; + wsrcLen_ = 0; + fnType_ = Fn_STD; + + uS0_=NULL; + ubulk_=NULL; + sbulk_=NULL; + + //fillin wlines_[], sS0_[] + prepareLinesForStd(); + } + + StringPerfFunction(ICUStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen) + { + + fn1_ = func; + lines_=NULL; + wlines_=NULL; + numLines_=0; + uselen_=uselen; + line_mode_=FALSE; + src_ = new UChar[sourceLen]; + memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR); + srcLen_ = sourceLen; + wsrc_ = NULL; + wsrcLen_ = 0; + fnType_ = Fn_ICU; + + uS0_=NULL; + sS0_=NULL; + ubulk_=new UnicodeString(src_,srcLen_); + sbulk_=NULL; + } + + StringPerfFunction(StdStringPerfFn func, UChar* source, int32_t sourceLen, UBool uselen) + { + + fn2_ = func; + lines_=NULL; + wlines_=NULL; + numLines_=0; + uselen_=uselen; + line_mode_=FALSE; + src_ = new UChar[sourceLen]; + memcpy(src_, source, sourceLen * U_SIZEOF_UCHAR); + srcLen_ = sourceLen; + fnType_ = Fn_STD; + + uS0_=NULL; + sS0_=NULL; + ubulk_=NULL; + + //fillin wsrc_, sbulk_ + prepareBulkForStd(); + + } + + ~StringPerfFunction() + { + //free(src_); + free(wsrc_); + delete[] src_; + delete ubulk_; + delete sbulk_; + delete[] uS0_; + delete[] sS0_; + delete[] wlines_; + } + +private: + void prepareLinesForStd(void) + { + UErrorCode err=U_ZERO_ERROR; + + wlines_=new WLine[numLines_]; + wchar_t ws[100]; + int32_t wcap = sizeof(ws) / sizeof(*ws); + int32_t wl; + wchar_t* wcs; + + sS0_=new stlstring[numLines_]; + for(int32_t i=0; i<numLines_; i++) { + if(uselen_) { + wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len, &err); + memcpy(wlines_[i].name, wcs, wl * sizeof(wchar_t)); + wlines_[i].len = wl; + sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len); + } else { + wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len-1, &err); + memcpy(wlines_[i].name, wcs, wl*sizeof(wchar_t)); + wlines_[i].len = wl; + sS0_[i]=stlstring(wlines_[i].name, wlines_[i].len+1); + } + + if (U_FAILURE(err)) { + return; + } + } + + } + + void prepareBulkForStd(void) + { + UErrorCode err=U_ZERO_ERROR; + + const UChar* uSrc = src_; + int32_t uSrcLen = srcLen_; + wchar_t* wDest = NULL; + int32_t wDestLen = 0; + int32_t reqLen= 0 ; + + if(uselen_) { + /* pre-flight*/ + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err); + + if(err == U_BUFFER_OVERFLOW_ERROR){ + err=U_ZERO_ERROR; + wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen)); + wDestLen = reqLen; + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen,&err); + } + + if (U_SUCCESS(err)) { + wsrc_ = wDest; + wsrcLen_ = wDestLen; + sbulk_=new stlstring(wsrc_,wsrcLen_); + } + + } else { + /* pre-flight*/ + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err); + + if(err == U_BUFFER_OVERFLOW_ERROR){ + err=U_ZERO_ERROR; + wDest =(wchar_t*) malloc(sizeof(wchar_t) * (reqLen+1)); + wDestLen = reqLen+1; + u_strToWCS(wDest,wDestLen,&reqLen,uSrc,uSrcLen-1,&err); + } + + if (U_SUCCESS(err)) { + wsrc_ = wDest; + wsrcLen_ = wDestLen; + sbulk_=new stlstring(wsrc_); + } + } + + //free(wDest); + } + + +private: + ICUStringPerfFn fn1_; + StdStringPerfFn fn2_; + + ULine* lines_; + WLine* wlines_; + int32_t numLines_; + + UBool uselen_; + UChar* src_; + int32_t srcLen_; + wchar_t* wsrc_; + int32_t wsrcLen_; + UBool line_mode_; + + //added for preparing testing data + UnicodeString* uS0_; + stlstring* sS0_; + UnicodeString* ubulk_; + stlstring* sbulk_; + FnType fnType_; +}; + + +class StringPerformanceTest : public UPerfTest +{ +public: + StringPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status); + ~StringPerformanceTest(); + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, + const char *&name, + char *par = NULL); + UPerfFunction* TestCtor(); + UPerfFunction* TestCtor1(); + UPerfFunction* TestCtor2(); + UPerfFunction* TestCtor3(); + UPerfFunction* TestAssign(); + UPerfFunction* TestAssign1(); + UPerfFunction* TestAssign2(); + UPerfFunction* TestGetch(); + UPerfFunction* TestCatenate(); + UPerfFunction* TestScan(); + UPerfFunction* TestScan1(); + UPerfFunction* TestScan2(); + + UPerfFunction* TestStdLibCtor(); + UPerfFunction* TestStdLibCtor1(); + UPerfFunction* TestStdLibCtor2(); + UPerfFunction* TestStdLibCtor3(); + UPerfFunction* TestStdLibAssign(); + UPerfFunction* TestStdLibAssign1(); + UPerfFunction* TestStdLibAssign2(); + UPerfFunction* TestStdLibGetch(); + UPerfFunction* TestStdLibCatenate(); + UPerfFunction* TestStdLibScan(); + UPerfFunction* TestStdLibScan1(); + UPerfFunction* TestStdLibScan2(); + +private: + long COUNT_; + ULine* filelines_; + UChar* StrBuffer; + int32_t StrBufferLen; + +}; + + +inline void ctor(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UnicodeString a; +} + +inline void ctor1(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UnicodeString b(uTESTCHAR1); +} + +inline void ctor2(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UnicodeString c(uEMPTY); +} + +inline void ctor3(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UnicodeString d(src,srcLen); +} + +inline UnicodeString icu_assign_helper(const UChar* src,int32_t srcLen) +{ + if (srcLen==-1) { return src;} + else { return UnicodeString(src, srcLen);} +} + +inline void assign(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + unistr = icu_assign_helper(src,srcLen); +} + +inline void assign1(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + unistr.setTo(src, srcLen); +} + +inline void assign2(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + unistr = s0; +} + +inline void getch(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + s0.charAt(0); +} + + +inline void catenate(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UTimer mystart, mystop; + utimer_getTime(&mystart); + + *catICU += s0; + + utimer_getTime(&mystop); + double mytime = utimer_getDeltaSeconds(&mystart,&mystop); + printf("\nmytime=%f \n", mytime); + + *catICU += uCatenate_STR; +} + +volatile int scan_idx; +U_STRING_DECL(SCAN1, "123", 3); + +inline void scan(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UChar c='.'; + scan_idx = uScan_STRING.indexOf(c); +} + +inline void scan1(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + scan_idx = uScan_STRING.indexOf(SCAN1,3); +} + +inline void scan2(const UChar* src,int32_t srcLen, UnicodeString s0) +{ + UChar c1='s'; + UChar c2='m'; + scan_idx = uScan_STRING.indexOf(c1); + scan_idx = uScan_STRING.indexOf(c2); +} + + +inline void StdLibCtor(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + stlstring a; +} + +inline void StdLibCtor1(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + stlstring b(simulate); +} + +inline void StdLibCtor2(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + stlstring c(sEMPTY); +} + +inline void StdLibCtor3(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + if (srcLen==-1) { + stlstring d(src); + }else { + stlstring d(src, srcLen); + } +} + +inline stlstring stl_assign_helper(const wchar_t* src,int32_t srcLen) +{ + if (srcLen==-1) { return src;} + else { return stlstring(src, srcLen);} +} + +inline void StdLibAssign(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + stlstr = stl_assign_helper(src,srcLen); +} + +inline void StdLibAssign1(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + if (srcLen==-1) { stlstr=src;} + else { stlstr.assign(src, srcLen);} +} + +inline void StdLibAssign2(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + stlstr=s0; +} + +inline void StdLibGetch(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + s0.at(0); +} + +inline void StdLibCatenate(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + UTimer mystart, mystop; + utimer_getTime(&mystart); + + *catStd += s0; + *catStd += sCatenate_STR; + + utimer_getTime(&mystop); + double mytime = utimer_getDeltaSeconds(&mystart,&mystop); + printf("\nmytime=%f \n", mytime); + +} + +inline void StdLibScan(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + scan_idx = (int) sScan_STRING.find('.'); +} + +inline void StdLibScan1(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + scan_idx = (int) sScan_STRING.find(L"123"); +} + +inline void StdLibScan2(const wchar_t* src,int32_t srcLen, stlstring s0) +{ + scan_idx = (int) sScan_STRING.find_first_of(L"sm"); +} + +#endif // STRINGPERF_H + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj new file mode 100644 index 00000000000..1c1f32309e6 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/ustrperf/stringperf.vcproj @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="stringperf" + ProjectGUID="{523710EA-349D-45BF-8B39-289CC86E7D91}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/stringperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Release/stringperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + OutputFile=".\Release/stringperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/stringperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/stringperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + PrecompiledHeaderFile=".\Debug/stringperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1047" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib icutestd.lib winmm.lib" + OutputFile=".\Debug/stringperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/stringperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="stringperf.cpp" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="stringperf.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in new file mode 100644 index 00000000000..dbaf1ab4316 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/Makefile.in @@ -0,0 +1,79 @@ +## Makefile.in for ICU - test/perf/utfperf +## Copyright (c) 2001-2006, 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 + +## Build directory information +subdir = test/perf/utfperf + +## Extra files to remove for 'make clean' +CLEANFILES = *~ $(DEPS) + +## Target information +TARGET = utfperf + +CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw +LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) + +OBJECTS = utfperf.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)),) +ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) +-include $(DEPS) +endif +endif +endif + diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl new file mode 100755 index 00000000000..0c7ff961a3a --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/UtfPerf.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2005, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + +use strict; + +use lib '../perldriver'; + +use PerfFramework; + + +my $options = { + "title"=>"Utf performance: ICU", + "headers"=>"ICU", + "operationIs"=>"gb18030 encoding string", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>"../data", + "outputDir"=>"../results" + }; + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p = "debug/utfperf.exe -e gb18030"; + +my $tests = { + "UTF-8", ["$p UTF_8"], + "UTF-8 small buffer", ["$p UTF_8_SB"], + "SCSU", ["$p SCSU"], + "SCSU small buffer", ["$p SCSU_SB"], + "BOCU_1", ["$p BOCU_1"], + "BOCU_1 small buffer", ["$p BOCU_1_SB"], + }; + +my $dataFiles = { + "", + [ + "four.txt" + ] + }; + +runTests($options, $tests, $dataFiles); diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp new file mode 100644 index 00000000000..e5e26ca49ea --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.cpp @@ -0,0 +1,365 @@ +/* + ********************************************************************** + * Copyright (C) 2002-2007, International Business Machines + * Corporation and others. All Rights Reserved. + ********************************************************************** + * file name: utfperf.cpp + * encoding: US-ASCII + * tab size: 8 (not used) + * indentation:4 + * + * created on: 2005Nov17 + * created by: Raymond Yang + * + * Ported from utfper.c created by Markus W. Scherer + * Performance test program for Unicode converters + */ + +#include <stdio.h> +#include <stdlib.h> +#include "unicode/uperf.h" +#include "uoptions.h" + +#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) + +/* definitions and text buffers */ + +#define INPUT_CAPACITY (1024*1024) +#define INTERMEDIATE_CAPACITY 4096 +#define INTERMEDIATE_SMALL_CAPACITY 20 +#define PIVOT_CAPACITY 1024 +#define OUTPUT_CAPACITY INPUT_CAPACITY + +static char utf8[INPUT_CAPACITY]; +static UChar pivot[INTERMEDIATE_CAPACITY]; + +static UChar output[OUTPUT_CAPACITY]; +static char intermediate[OUTPUT_CAPACITY]; + +static int32_t utf8Length, encodedLength, outputLength, countInputCodePoints; + +static int32_t fromUCallbackCount; + +// Command-line options specific to utfperf. +// Options do not have abbreviations: Force readable command lines. +// (Using U+0001 for abbreviation characters.) +enum { + CHARSET, + CHUNK_LENGTH, + PIVOT_LENGTH, + UTFPERF_OPTIONS_COUNT +}; + +static UOption options[UTFPERF_OPTIONS_COUNT]={ + UOPTION_DEF("charset", '\x01', UOPT_REQUIRES_ARG), + UOPTION_DEF("chunk", '\x01', UOPT_REQUIRES_ARG), + UOPTION_DEF("pivot", '\x01', UOPT_REQUIRES_ARG) +}; + +static const char *const utfperf_usage = + "\t--charset Charset for which to test performance, e.g. windows-1251.\n" + "\t Default: UTF-8\n" + "\t--chunk Length (in bytes) of charset output chunks. [4096]\n" + "\t--pivot Length (in UChars) of the UTF-16 pivot buffer, if applicable.\n" + "\t [1024]\n"; + +// Test object. +class UtfPerformanceTest : public UPerfTest{ +public: + UtfPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status) + : UPerfTest(argc, argv, options, LENGTHOF(options), utfperf_usage, status) { + if (U_SUCCESS(status)) { + charset = options[CHARSET].value; + + chunkLength = atoi(options[CHUNK_LENGTH].value); + if (chunkLength < 1 || OUTPUT_CAPACITY < chunkLength) { + fprintf(stderr, "error: chunk length must be 1..%ld\n", (long)OUTPUT_CAPACITY); + status = U_ILLEGAL_ARGUMENT_ERROR; + } + + pivotLength = atoi(options[PIVOT_LENGTH].value); + if (pivotLength < 1 || PIVOT_CAPACITY < pivotLength) { + fprintf(stderr, "error: pivot length must be 1..%ld\n", (long)PIVOT_CAPACITY); + status = U_ILLEGAL_ARGUMENT_ERROR; + } + + int32_t inputLength; + UPerfTest::getBuffer(inputLength, status); + countInputCodePoints = u_countChar32(buffer, bufferLen); + u_strToUTF8(utf8, (int32_t)sizeof(utf8), &utf8Length, buffer, bufferLen, &status); + } + } + + virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL); + + const UChar *getBuffer() const { return buffer; } + int32_t getBufferLen() const { return bufferLen; } + + const char *charset; + int32_t chunkLength, pivotLength; +}; + +U_CDECL_BEGIN +// Custom callback for counting callback calls. +static void U_CALLCONV +fromUCallback(const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar *codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode *pErrorCode) { + if (reason <= UCNV_IRREGULAR) { + ++fromUCallbackCount; + } + UCNV_FROM_U_CALLBACK_SUBSTITUTE(context, fromUArgs, codeUnits, length, codePoint, reason, pErrorCode); +} +U_CDECL_END + +// Base class for Roundtrip, FromUnicode and FromUTF8 with common setup. +class Command : public UPerfFunction { +protected: + Command(const UtfPerformanceTest &testcase) + : testcase(testcase), + input(testcase.getBuffer()), inputLength(testcase.getBufferLen()), + errorCode(U_ZERO_ERROR) { + cnv=ucnv_open(testcase.charset, &errorCode); + if (U_FAILURE(errorCode)) { + fprintf(stderr, "error opening converter for \"%s\" - %s\n", testcase.charset, u_errorName(errorCode)); + } + ucnv_setFromUCallBack(cnv, fromUCallback, NULL, NULL, NULL, &errorCode); + } +public: + virtual ~Command(){ + if(U_SUCCESS(errorCode)) { + ucnv_close(cnv); + } + } + // virtual void call(UErrorCode* pErrorCode) { ... } + virtual long getOperationsPerIteration(){ + return countInputCodePoints; + } + + const UtfPerformanceTest &testcase; + const UChar *input; + int32_t inputLength; + UErrorCode errorCode; + UConverter *cnv; +}; + +// Test roundtrip UTF-16->encoding->UTF-16. +class Roundtrip : public Command { +protected: + Roundtrip(const UtfPerformanceTest &testcase) : Command(testcase) {} +public: + static UPerfFunction* get(const UtfPerformanceTest &testcase) { + Roundtrip * t = new Roundtrip(testcase); + if (U_SUCCESS(t->errorCode)){ + return t; + } else { + delete t; + return NULL; + } + } + virtual void call(UErrorCode* pErrorCode){ + const UChar *pIn, *pInLimit; + UChar *pOut, *pOutLimit; + char *pInter, *pInterLimit; + const char *p; + UBool flush; + + ucnv_reset(cnv); + fromUCallbackCount=0; + + pIn=input; + pInLimit=input+inputLength; + + pOut=output; + pOutLimit=output+OUTPUT_CAPACITY; + + pInterLimit=intermediate+testcase.chunkLength; + + encodedLength=outputLength=0; + flush=FALSE; + + do { + /* convert a block of [pIn..pInLimit[ to the encoding in intermediate[] */ + pInter=intermediate; + ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode); + encodedLength+=(int32_t)(pInter-intermediate); + + if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { + /* make sure that we convert once more to really flush */ + *pErrorCode=U_ZERO_ERROR; + } else if(U_FAILURE(*pErrorCode)) { + return; + } else if(pIn==pInLimit) { + flush=TRUE; + } + + /* convert the block [intermediate..pInter[ back to UTF-16 */ + p=intermediate; + ucnv_toUnicode(cnv, &pOut, pOutLimit,&p, pInter,NULL, flush,pErrorCode); + if(U_FAILURE(*pErrorCode)) { + return; + } + /* intermediate must have been consumed (p==pInter) because of the converter semantics */ + } while(!flush); + + outputLength=pOut-output; + if(inputLength!=outputLength) { + fprintf(stderr, "error: roundtrip failed, inputLength %d!=outputLength %d\n", inputLength, outputLength); + *pErrorCode=U_INTERNAL_PROGRAM_ERROR; + } + } +}; + +// Test one-way conversion UTF-16->encoding. +class FromUnicode : public Command { +protected: + FromUnicode(const UtfPerformanceTest &testcase) : Command(testcase) {} +public: + static UPerfFunction* get(const UtfPerformanceTest &testcase) { + FromUnicode * t = new FromUnicode(testcase); + if (U_SUCCESS(t->errorCode)){ + return t; + } else { + delete t; + return NULL; + } + } + virtual void call(UErrorCode* pErrorCode){ + const UChar *pIn, *pInLimit; + char *pInter, *pInterLimit; + + ucnv_resetFromUnicode(cnv); + fromUCallbackCount=0; + + pIn=input; + pInLimit=input+inputLength; + + pInterLimit=intermediate+testcase.chunkLength; + + encodedLength=0; + + for(;;) { + pInter=intermediate; + ucnv_fromUnicode(cnv, &pInter, pInterLimit, &pIn, pInLimit, NULL, TRUE, pErrorCode); + encodedLength+=(int32_t)(pInter-intermediate); + + if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { + /* make sure that we convert once more to really flush */ + *pErrorCode=U_ZERO_ERROR; + } else if(U_FAILURE(*pErrorCode)) { + return; + } else { + break; // all done + } + } + } +}; + +// Test one-way conversion UTF-8->encoding. +class FromUTF8 : public Command { +protected: + FromUTF8(const UtfPerformanceTest &testcase) + : Command(testcase), + utf8Cnv(NULL), + input8(utf8), input8Length(utf8Length) { + utf8Cnv=ucnv_open("UTF-8", &errorCode); + } +public: + static UPerfFunction* get(const UtfPerformanceTest &testcase) { + FromUTF8 * t = new FromUTF8(testcase); + if (U_SUCCESS(t->errorCode)){ + return t; + } else { + delete t; + return NULL; + } + } + ~FromUTF8() { + ucnv_close(utf8Cnv); + } + virtual void call(UErrorCode* pErrorCode){ + const char *pIn, *pInLimit; + char *pInter, *pInterLimit; + UChar *pivotSource, *pivotTarget, *pivotLimit; + + ucnv_resetToUnicode(utf8Cnv); + ucnv_resetFromUnicode(cnv); + fromUCallbackCount=0; + + pIn=input8; + pInLimit=input8+input8Length; + + pInterLimit=intermediate+testcase.chunkLength; + + pivotSource=pivotTarget=pivot; + pivotLimit=pivot+testcase.pivotLength; + + encodedLength=0; + + for(;;) { + pInter=intermediate; + ucnv_convertEx(cnv, utf8Cnv, + &pInter, pInterLimit, + &pIn, pInLimit, + pivot, &pivotSource, &pivotTarget, pivotLimit, + FALSE, TRUE, pErrorCode); + encodedLength+=(int32_t)(pInter-intermediate); + + if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { + /* make sure that we convert once more to really flush */ + *pErrorCode=U_ZERO_ERROR; + } else if(U_FAILURE(*pErrorCode)) { + return; + } else { + break; // all done + } + } + } +protected: + UConverter *utf8Cnv; + const char *input8; + int32_t input8Length; +}; + +UPerfFunction* UtfPerformanceTest::runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) { + switch (index) { + case 0: name = "Roundtrip"; if (exec) return Roundtrip::get(*this); break; + case 1: name = "FromUnicode"; if (exec) return FromUnicode::get(*this); break; + case 2: name = "FromUTF8"; if (exec) return FromUTF8::get(*this); break; + default: name = ""; break; + } + return NULL; +} + +int main(int argc, const char *argv[]) +{ + // Default values for command-line options. + options[CHARSET].value = "UTF-8"; + options[CHUNK_LENGTH].value = "4096"; + options[PIVOT_LENGTH].value = "1024"; + + UErrorCode status = U_ZERO_ERROR; + UtfPerformanceTest test(argc, argv, status); + + if (U_FAILURE(status)){ + printf("The error is %s\n", u_errorName(status)); + test.usage(); + return status; + } + + if (test.run() == FALSE){ + fprintf(stderr, "FAILED: Tests could not be run please check the " + "arguments.\n"); + return -1; + } + + if (fromUCallbackCount > 0) { + printf("Number of fromUnicode callback calls in the last iteration: %ld\n", (long)fromUCallbackCount); + } + + return 0; +} diff --git a/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj new file mode 100644 index 00000000000..d333f02fd16 --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/test/perf/utfperf/utfperf.vcproj @@ -0,0 +1,223 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="utfperf" + ProjectGUID="{E7728E98-0469-43F4-AF37-4529A3D52C6B}" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Debug/utfperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + PrecompiledHeaderFile=".\Debug/utfperf.pch" + AssemblerListingLocation=".\Debug/" + ObjectFile=".\Debug/" + ProgramDataBaseFileName=".\Debug/" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuucd.lib icutud.lib winmm.lib icutestd.lib" + OutputFile=".\Debug/utfperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + GenerateDebugInformation="true" + ProgramDatabaseFile=".\Debug/utfperf.pdb" + SubSystem="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TypeLibraryName=".\Release/utfperf.tlb" + HeaderFileName="" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories="..\..\..\..\include;..\..\..\tools\toolutil;..\..\..\common;..\..\..\tools\ctestfw" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + PrecompiledHeaderFile=".\Release/utfperf.pch" + AssemblerListingLocation=".\Release/" + ObjectFile=".\Release/" + ProgramDataBaseFileName=".\Release/" + WarningLevel="3" + SuppressStartupBanner="true" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="icuuc.lib icutu.lib icutest.lib winmm.lib" + OutputFile=".\Release/utfperf.exe" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="..\..\..\..\lib\" + ProgramDatabaseFile=".\Release/utfperf.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath=".\utfperf.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |