text:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|ARM">
      <Configuration>Debug</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|ARM64">
      <Configuration>Debug</Configuration>
      <Platform>ARM64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|ARM">
      <Configuration>Release</Configuration>
      <Platform>ARM</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|ARM64">
      <Configuration>Release</Configuration>
      <Platform>ARM64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{C10CF34B-3F79-430E-AD38-5A32DC0589C2}</ProjectGuid>
    <Keyword>DynamicLibrary</Keyword>
    <DefaultLanguage>en-US</DefaultLanguage>
  </PropertyGroup>
  <PropertyGroup Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseOfMfc>false</UseOfMfc>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
<!-- The following import will include the UWP configuration options for VS projects. -->
  <Import Project="..\allinone\Build.Windows.UWP.ProjectConfiguration.props" />
  <!-- The following import will include the library configuration options for VS projects. -->
  <Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
    <OutDir>.\$(Platform)\$(Configuration)UWP\</OutDir>
    <IntDir>.\$(Platform)\$(Configuration)UWP\</IntDir>
    <!-- The ICU projects use "Win32" to mean "x86", so we need to special case it. -->
    <OutDir Condition="'$(Platform)'=='Win32'">.\x86\$(Configuration)UWP\</OutDir>
    <IntDir Condition="'$(Platform)'=='Win32'">.\x86\$(Configuration)UWP\</IntDir>
    <!-- Disable Incremental Linking for Release builds as it prevents Link-time Code Generation -->
    <LinkIncremental Condition="'$(Configuration)'=='Debug'">true</LinkIncremental>
    <LinkIncremental Condition="'$(Configuration)'=='Release'">false</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <!-- Options that are common to *all* configurations -->
    <Midl>
      <MkTypLibCompatible>true</MkTypLibCompatible>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <TypeLibraryName>$(OutDir)\icuuc.tlb</TypeLibraryName>
    </Midl>
    <ClCompile>
      <AdditionalIncludeDirectories>..\..\include;..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <!-- U_DISABLE_RENAMING -->
      <!-- U_HIDE_DRAFT_API & U_HIDE_DEPRECATED_API -->
      <PreprocessorDefinitions>U_ATTRIBUTE_DEPRECATED=;_CRT_SECURE_NO_DEPRECATE;U_COMMON_IMPLEMENTATION;U_PLATFORM_USES_ONLY_WIN32_API=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <StringPooling>true</StringPooling>
      <ExceptionHandling>
      </ExceptionHandling>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <DisableLanguageExtensions>false</DisableLanguageExtensions>
      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
      <WarningLevel>Level3</WarningLevel>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <CompileAs>Default</CompileAs>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <CompileAsWinRT>false</CompileAsWinRT>
      <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
      <PrecompiledHeaderOutputFile>$(OutDir)/icuuc.pch</PrecompiledHeaderOutputFile>
      <AssemblerListingLocation>$(OutDir)/</AssemblerListingLocation>
      <ObjectFileName>$(OutDir)/</ObjectFileName>
      <ProgramDataBaseFileName>$(OutDir)/icuuc.pdb</ProgramDataBaseFileName>
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
    </ClCompile>
    <ResourceCompile>
      <Culture>0x0409</Culture>
      <AdditionalIncludeDirectories>../common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Link>
      <SuppressStartupBanner>true</SuppressStartupBanner>
      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
      <RandomizedBaseAddress>true</RandomizedBaseAddress>
      <DataExecutionPrevention>
      </DataExecutionPrevention>
      <TurnOffAssemblyGeneration>true</TurnOffAssemblyGeneration>
      <IgnoreSpecificDefaultLibraries>vccorlib.lib;msvcrt.lib</IgnoreSpecificDefaultLibraries>
      <!-- The icudt.lib is for U_ICUDATA_ENTRY_POINT -->
      <AdditionalDependencies>icudt.lib;onecore.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
    <!-- Options that are common to all 'Release' configurations -->
    <Midl>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ClCompile>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ResourceCompile>
    <Link>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <AdditionalDependencies>vccorlib.lib;msvcrt.lib;vcruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <OutputFile>..\..\$(IcuBinOutputDir)\icuuc67.dll</OutputFile>
      <ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuuc.pdb</ProgramDatabaseFile>
      <ImportLibrary>..\..\$(IcuLibOutputDir)\icuuc.lib</ImportLibrary>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
    <!-- Options that are common to all 'Debug' configurations -->
    <Midl>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ClCompile>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
      <Optimization>Disabled</Optimization>
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
      <BufferSecurityCheck>true</BufferSecurityCheck>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ResourceCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;vcruntimed.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <OutputFile>..\..\$(IcuBinOutputDir)\icuuc67d.dll</OutputFile>
      <ProgramDatabaseFile>.\..\..\$(IcuLibOutputDir)\icuucd.pdb</ProgramDatabaseFile>
      <ImportLibrary>..\..\$(IcuLibOutputDir)\icuucd.lib</ImportLibrary>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
    <!-- Options that are common to all 32-bit configurations -->
    <Midl>
      <TargetEnvironment>Win32</TargetEnvironment>
    </Midl>
    <ClCompile>
      <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <!-- This is so that we can use the existing stubdata icudt.lib and not need a UWP version. -->
      <AdditionalLibraryDirectories>.\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
    <!-- Options that are common to all 64-bit configurations -->
    <Midl>
      <TargetEnvironment>X64</TargetEnvironment>
    </Midl>
    <ClCompile>
      <PreprocessorDefinitions>WIN64;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <TargetMachine>MachineX64</TargetMachine>
      <!-- This is so that we can use the existing stubdata icudt.lib and not need a UWP version. -->
      <AdditionalLibraryDirectories>.\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Platform)'=='ARM'">
    <!-- Options that are common to all ARM configurations -->
    <Midl>
      <TargetEnvironment>ARM</TargetEnvironment>
    </Midl>
    <ClCompile>
      <PreprocessorDefinitions>ARM;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <TargetMachine>MachineARM</TargetMachine>
      <!-- This is so that we can use the existing stubdata icudt.lib and not need a UWP version. -->
      <AdditionalLibraryDirectories>.\..\..\libARM;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Platform)'=='ARM64'">
    <!-- Options that are common to all ARM64 configurations -->
    <Midl>
      <TargetEnvironment>ARM64</TargetEnvironment>
    </Midl>
    <ClCompile>
      <PreprocessorDefinitions>ARM64;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <TargetMachine>MachineARM64</TargetMachine>
      <!-- This is so that we can use the existing stubdata icudt.lib and not need a UWP version. -->
      <AdditionalLibraryDirectories>.\..\..\libARM64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClCompile Include="edits.cpp" />
    <ClCompile Include="filteredbrk.cpp" />
    <ClCompile Include="ubidi.cpp" />
    <ClCompile Include="ubidi_props.cpp" />
    <ClCompile Include="ubiditransform.cpp" />
    <ClCompile Include="ubidiln.cpp" />
    <ClCompile Include="ubidiwrt.cpp" />
    <ClCompile Include="uloc_keytype.cpp" />
    <ClCompile Include="ushape.cpp" />
    <ClCompile Include="brkeng.cpp" />
    <ClCompile Include="brkiter.cpp" />
    <ClCompile Include="dictbe.cpp" />
    <ClCompile Include="pluralmap.cpp" />
    <ClCompile Include="rbbi.cpp" />
    <ClCompile Include="rbbidata.cpp" />
    <ClCompile Include="rbbinode.cpp" />
    <ClCompile Include="rbbirb.cpp" />
    <ClCompile Include="rbbiscan.cpp" />
    <ClCompile Include="rbbisetb.cpp" />
    <ClCompile Include="rbbistbl.cpp" />
    <ClCompile Include="rbbitblb.cpp" />
    <ClCompile Include="rbbi_cache.cpp" />
    <ClCompile Include="dictionarydata.cpp" />
    <ClCompile Include="ubrk.cpp" />
    <ClCompile Include="ucol_swp.cpp" />
    <ClCompile Include="propsvec.cpp" />
    <ClCompile Include="uarrsort.cpp" />
    <ClCompile Include="uenum.cpp" />
    <ClCompile Include="uhash.cpp" />
    <ClCompile Include="uhash_us.cpp" />
    <ClCompile Include="ulist.cpp" />
    <ClCompile Include="ustack.cpp" />
    <ClCompile Include="ustrenum.cpp" />
    <ClCompile Include="utrie.cpp" />
    <ClCompile Include="utrie_swap.cpp" />
    <ClCompile Include="utrie2.cpp" />
    <ClCompile Include="utrie2_builder.cpp" />
    <ClCompile Include="uvector.cpp" />
    <ClCompile Include="uvectr32.cpp" />
    <ClCompile Include="uvectr64.cpp" />
    <ClCompile Include="errorcode.cpp" />
    <ClCompile Include="icudataver.cpp" />
    <ClCompile Include="locmap.cpp" />
    <ClCompile Include="putil.cpp" />
    <ClCompile Include="umath.cpp" />
    <ClCompile Include="umutex.cpp" />
    <ClCompile Include="utrace.cpp" />
    <ClCompile Include="utypes.cpp" />
    <ClCompile Include="wintz.cpp" />
    <ClCompile Include="ucnv.cpp" />
    <ClCompile Include="ucnv2022.cpp" />
    <ClCompile Include="ucnv_bld.cpp" />
    <ClCompile Include="ucnv_cb.cpp" />
    <ClCompile Include="ucnv_cnv.cpp" />
    <ClCompile Include="ucnv_ct.cpp" />
    <ClCompile Include="ucnv_err.cpp" />
    <ClCompile Include="ucnv_ext.cpp" />
    <ClCompile Include="ucnv_io.cpp" />
    <ClCompile Include="ucnv_lmb.cpp" />
    <ClCompile Include="ucnv_set.cpp" />
    <ClCompile Include="ucnv_u16.cpp" />
    <ClCompile Include="ucnv_u32.cpp" />
    <ClCompile Include="ucnv_u7.cpp" />
    <ClCompile Include="ucnv_u8.cpp" />
    <ClCompile Include="ucnvbocu.cpp" />
    <ClCompile Include="ucnvdisp.cpp" />
    <ClCompile Include="ucnvhz.cpp" />
    <ClCompile Include="ucnvisci.cpp" />
    <ClCompile Include="ucnvlat1.cpp" />
    <ClCompile Include="ucnvmbcs.cpp" />
    <ClCompile Include="ucnvscsu.cpp" />
    <ClCompile Include="ucnvsel.cpp" />
    <ClCompile Include="cmemory.cpp" />
    <ClCompile Include="ucln_cmn.cpp" />
    <ClCompile Include="ucmndata.cpp" />
    <ClCompile Include="udata.cpp" />
    <ClCompile Include="udatamem.cpp" />
    <ClCompile Include="udataswp.cpp" />
    <ClCompile Include="uinit.cpp" />
    <ClCompile Include="umapfile.cpp" />
    <ClCompile Include="uobject.cpp" />
    <ClCompile Include="dtintrv.cpp" />
    <ClCompile Include="parsepos.cpp" />
    <ClCompile Include="ustrfmt.cpp" />
    <ClCompile Include="util.cpp" />
    <ClCompile Include="util_props.cpp" />
    <ClCompile Include="punycode.cpp" />
    <ClCompile Include="uidna.cpp" />
    <ClCompile Include="uts46.cpp" />
    <ClCompile Include="localebuilder.cpp" />
    <ClCompile Include="localematcher.cpp" />
    <ClCompile Include="localeprioritylist.cpp" />
    <ClCompile Include="locavailable.cpp" />
    <ClCompile Include="locbased.cpp" />
    <ClCompile Include="locdispnames.cpp" />
    <ClCompile Include="locdistance.cpp" />
    <ClCompile Include="locdspnm.cpp" />
    <ClCompile Include="locid.cpp" />
    <ClCompile Include="loclikely.cpp" />
    <ClCompile Include="loclikelysubtags.cpp" />
    <ClCompile Include="locresdata.cpp" />
    <ClCompile Include="locutil.cpp" />
    <ClCompile Include="lsr.cpp" />
    <ClCompile Include="resbund.cpp" />
    <ClCompile Include="resbund_cnv.cpp" />
    <ClCompile Include="ucat.cpp" />
    <ClCompile Include="uloc.cpp" />
    <ClCompile Include="uloc_tag.cpp" />
    <ClCompile Include="ures_cnv.cpp" />
    <ClCompile Include="uresbund.cpp" />
    <ClCompile Include="uresdata.cpp" />
    <ClCompile Include="resource.cpp" />
    <ClCompile Include="ucurr.cpp" />
    <ClCompile Include="caniter.cpp" />
    <ClCompile Include="filterednormalizer2.cpp" />
    <ClCompile Include="loadednormalizer2impl.cpp" />
    <ClCompile Include="normalizer2.cpp" />
    <ClCompile Include="normalizer2impl.cpp" />
    <ClCompile Include="normlzr.cpp" />
    <ClCompile Include="unorm.cpp" />
    <ClCompile Include="unormcmp.cpp" />
    <ClCompile Include="bmpset.cpp" />
    <ClCompile Include="patternprops.cpp" />
    <ClCompile Include="propname.cpp" />
    <ClCompile Include="ruleiter.cpp" />
    <ClCompile Include="ucase.cpp" />
    <ClCompile Include="uchar.cpp" />
    <ClCompile Include="characterproperties.cpp" />
    <ClCompile Include="unames.cpp" />
    <ClCompile Include="unifiedcache.cpp" />
    <ClCompile Include="unifilt.cpp" />
    <ClCompile Include="unifunct.cpp" />
    <ClCompile Include="uniset.cpp" />
    <ClCompile Include="uniset_closure.cpp" />
    <ClCompile Include="uniset_props.cpp" />
    <ClCompile Include="unisetspan.cpp" />
    <ClCompile Include="uprops.cpp" />
    <ClCompile Include="usc_impl.cpp" />
    <ClCompile Include="uscript.cpp" />
    <ClCompile Include="uscript_props.cpp" />
    <ClCompile Include="uset.cpp" />
    <ClCompile Include="uset_props.cpp" />
    <ClCompile Include="usetiter.cpp" />
    <ClCompile Include="icuplug.cpp" />
    <ClCompile Include="serv.cpp" />
    <ClCompile Include="servlk.cpp" />
    <ClCompile Include="servlkf.cpp" />
    <ClCompile Include="servls.cpp" />
    <ClCompile Include="servnotf.cpp" />
    <ClCompile Include="servrbf.cpp" />
    <ClCompile Include="servslkf.cpp" />
    <ClCompile Include="usprep.cpp" />
    <ClCompile Include="appendable.cpp" />
    <ClCompile Include="bytesinkutil.cpp" />
    <ClCompile Include="bytestream.cpp" />
    <ClCompile Include="bytestrie.cpp" />
    <ClCompile Include="bytestriebuilder.cpp" />
    <ClCompile Include="bytestrieiterator.cpp" />
    <ClCompile Include="chariter.cpp" />
    <ClCompile Include="charstr.cpp" />
    <ClCompile Include="cstring.cpp" />
    <ClCompile Include="cstr.cpp" />
    <ClCompile Include="cwchar.cpp" />
    <ClCompile Include="messagepattern.cpp" />
    <ClCompile Include="schriter.cpp" />
    <ClCompile Include="stringpiece.cpp" />
    <ClCompile Include="stringtriebuilder.cpp" />
    <ClCompile Include="simpleformatter.cpp" />
    <ClCompile Include="ucasemap.cpp" />
    <ClCompile Include="ucasemap_titlecase_brkiter.cpp" />
    <ClCompile Include="ucharstrie.cpp" />
    <ClCompile Include="ucharstriebuilder.cpp" />
    <ClCompile Include="ucharstrieiterator.cpp" />
    <ClCompile Include="ucptrie.cpp" />
    <ClCompile Include="uchriter.cpp" />
    <ClCompile Include="uinvchar.cpp" />
    <ClCompile Include="uiter.cpp" />
    <ClCompile Include="umutablecptrie.cpp" />
    <ClCompile Include="unistr.cpp" />
    <ClCompile Include="unistr_case.cpp" />
    <ClCompile Include="unistr_case_locale.cpp" />
    <ClCompile Include="unistr_cnv.cpp" />
    <ClCompile Include="unistr_props.cpp" />
    <ClCompile Include="unistr_titlecase_brkiter.cpp" />
    <ClCompile Include="ustr_cnv.cpp" />
    <ClCompile Include="ustr_titlecase_brkiter.cpp" />
    <ClCompile Include="ustr_wcs.cpp" />
    <ClCompile Include="ustrcase.cpp" />
    <ClCompile Include="ustrcase_locale.cpp" />
    <ClCompile Include="ustring.cpp" />
    <ClCompile Include="ustrtrns.cpp" />
    <ClCompile Include="utext.cpp" />
    <ClCompile Include="utf_impl.cpp" />
    <ClCompile Include="static_unicode_sets.cpp" />
    <ClCompile Include="restrace.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="localsvc.h" />
    <ClInclude Include="msvcres.h" />
    <ClInclude Include="pluralmap.h" />
    <ClInclude Include="propname_data.h" />
    <ClInclude Include="ubidi_props.h" />
    <ClInclude Include="ubidiimp.h" />
    <ClInclude Include="brkeng.h" />
    <ClInclude Include="dictbe.h" />
    <ClInclude Include="rbbidata.h" />
    <ClInclude Include="rbbinode.h" />
    <ClInclude Include="rbbirb.h" />
    <ClInclude Include="rbbirpt.h" />
    <ClInclude Include="rbbiscan.h" />
    <ClInclude Include="rbbisetb.h" />
    <ClInclude Include="rbbitblb.h" />
    <ClInclude Include="rbbi_cache.h" />
    <ClInclude Include="dictionarydata.h" />
    <ClInclude Include="ubidi_props_data.h" />
    <ClInclude Include="ubrkimpl.h" />
    <ClInclude Include="ucase_props_data.h" />
    <ClInclude Include="uchar_props_data.h" />
    <ClInclude Include="ucol_data.h" />
    <ClInclude Include="ucol_swp.h" />
    <ClInclude Include="unicode\ubiditransform.h" />
    <ClInclude Include="unistrappender.h" />
    <ClInclude Include="hash.h" />
    <ClInclude Include="propsvec.h" />
    <ClInclude Include="uarrsort.h" />
    <ClInclude Include="uelement.h" />
    <ClInclude Include="uenumimp.h" />
    <ClInclude Include="uhash.h" />
    <ClInclude Include="ulist.h" />
    <ClInclude Include="unicode\filteredbrk.h" />
    <ClInclude Include="ustrenum.h" />
    <ClInclude Include="utrie.h" />
    <ClInclude Include="utrie2.h" />
    <ClInclude Include="utrie2_impl.h" />
    <ClInclude Include="utypeinfo.h" />
    <ClInclude Include="uvector.h" />
    <ClInclude Include="uvectr32.h" />
    <ClInclude Include="uvectr64.h" />
    <ClInclude Include="cpputils.h" />
    <ClInclude Include="locmap.h" />
    <ClInclude Include="mutex.h" />
    <ClInclude Include="putilimp.h" />
    <ClInclude Include="uassert.h" />
    <ClInclude Include="umutex.h" />
    <ClInclude Include="uposixdefs.h" />
    <ClInclude Include="utracimp.h" />
    <ClInclude Include="wintz.h" />
    <ClInclude Include="ucnv_bld.h" />
    <ClInclude Include="ucnv_cnv.h" />
    <ClInclude Include="ucnv_ext.h" />
    <ClInclude Include="ucnv_imp.h" />
    <ClInclude Include="ucnv_io.h" />
    <ClInclude Include="ucnvmbcs.h" />
    <ClInclude Include="cmemory.h" />
    <ClInclude Include="ucln.h" />
    <ClInclude Include="ucln_cmn.h" />
    <ClInclude Include="ucln_imp.h" />
    <ClInclude Include="ucmndata.h" />
    <ClInclude Include="udatamem.h" />
    <ClInclude Include="udataswp.h" />
    <ClInclude Include="umapfile.h" />
    <ClInclude Include="ustrfmt.h" />
    <ClInclude Include="util.h" />
    <ClInclude Include="punycode.h" />
    <ClInclude Include="localeprioritylist.h" />
    <ClInclude Include="locbased.h" />
    <ClInclude Include="locdistance.h" />
    <ClInclude Include="loclikelysubtags.h" />
    <ClInclude Include="locutil.h" />
    <ClInclude Include="lsr.h" />
    <ClInclude Include="sharedobject.h" />
    <ClCompile Include="sharedobject.cpp" />
    <ClInclude Include="ulocimp.h" />
    <ClInclude Include="unifiedcache.h" />
    <ClInclude Include="uresdata.h" />
    <ClInclude Include="uresimp.h" />
    <ClInclude Include="ureslocs.h" />
    <ClInclude Include="resource.h" />
    <ClInclude Include="ucurrimp.h" />
    <ClInclude Include="norm2allmodes.h" />
    <ClInclude Include="normalizer2impl.h" />
    <ClInclude Include="unormimp.h" />
    <ClInclude Include="bmpset.h" />
    <ClInclude Include="messageimpl.h" />
    <ClInclude Include="patternprops.h" />
    <ClInclude Include="propname.h" />
    <ClInclude Include="ruleiter.h" />
    <ClInclude Include="ucase.h" />
    <ClInclude Include="ulayout_props.h" />
    <ClInclude Include="unisetspan.h" />
    <ClInclude Include="uprops.h" />
    <ClInclude Include="usc_impl.h" />
    <ClInclude Include="uset_imp.h" />
    <ClInclude Include="icuplugimp.h" />
    <ClInclude Include="serv.h" />
    <ClInclude Include="servloc.h" />
    <ClInclude Include="servnotf.h" />
    <ClInclude Include="sprpimpl.h" />
    <ClInclude Include="bytesinkutil.h" />
    <ClInclude Include="charstr.h" />
    <ClInclude Include="cstring.h" />
    <ClInclude Include="cstr.h" />
    <ClInclude Include="cwchar.h" />
    <ClInclude Include="uinvchar.h" />
    <ClInclude Include="ustr_cnv.h" />
    <ClInclude Include="ustr_imp.h" />
    <ClInclude Include="static_unicode_sets.h" />
    <ClInclude Include="capi_helper.h" />
    <ClInclude Include="restrace.h" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="common.rc" />
  </ItemGroup>
  <Target Name="Build" Condition="'$(SkipUWP)'=='true'">
    <Message Text="Skipping building the UWP project: $(MSBuildThisFile)" Importance="high" />
  </Target>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" Condition="'$(SkipUWP)'!='true'" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

repo_language: C

mime_type: text/x-c


text:
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
*   Copyright (C) 2009-2015, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
******************************************************************************
*
*  FILE NAME : icuplugimp.h
*
*  Internal functions for the ICU plugin system
*
*   Date         Name        Description
*   10/29/2009   sl          New.
******************************************************************************
*/

#ifndef ICUPLUGIMP_H
#define ICUPLUGIMP_H

#include "unicode/icuplug.h"

#if UCONFIG_ENABLE_PLUGINS

/*========================*/
/** @{ Library Manipulation
 */

/**
 * Open a library, adding a reference count if needed.
 * @param libName library name to load
 * @param status error code
 * @return the library pointer, or NULL
 * @internal internal use only
 */
U_INTERNAL void * U_EXPORT2
uplug_openLibrary(const char *libName, UErrorCode *status);

/**
 * Close a library, if its reference count is 0
 * @param lib the library to close
 * @param status error code
 * @internal internal use only
 */
U_INTERNAL void U_EXPORT2
uplug_closeLibrary(void *lib, UErrorCode *status);

/**
 * Get a library's name, or NULL if not found.
 * @param lib the library's name
 * @param status error code
 * @return the library name, or NULL if not found.
 * @internal internal use only
 */
U_INTERNAL  char * U_EXPORT2
uplug_findLibrary(void *lib, UErrorCode *status);

/** @} */

/*========================*/
/** {@ ICU Plugin internal interfaces
 */

/**
 * Initialize the plugins
 * @param status error result
 * @internal - Internal use only.
 */
U_INTERNAL void U_EXPORT2
uplug_init(UErrorCode *status);

/**
 * Get raw plug N
 * @internal - Internal use only
 */
U_INTERNAL UPlugData* U_EXPORT2
uplug_getPlugInternal(int32_t n);

/**
 * Get the name of the plugin file.
 * @internal - Internal use only.
 */
U_INTERNAL const char* U_EXPORT2
uplug_getPluginFile(void);

/** @} */

#endif

#endif


text:
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
*   Copyright (C) 1999-2010, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
*******************************************************************************
*   file name:  uinvchar.c
*   encoding:   UTF-8
*   tab size:   8 (not used)
*   indentation:2
*
*   created on: 2004sep14
*   created by: Markus W. Scherer
*
*   Functions for handling invariant characters, moved here from putil.c
*   for better modularization.
*/

#include "unicode/utypes.h"
#include "unicode/ustring.h"
#include "udataswp.h"
#include "cstring.h"
#include "cmemory.h"
#include "uassert.h"
#include "uinvchar.h"

/* invariant-character handling --------------------------------------------- */

/*
 * These maps for ASCII to/from EBCDIC map invariant characters (see utypes.h)
 * appropriately for most EBCDIC codepages.
 *
 * They currently also map most other ASCII graphic characters,
 * appropriately for codepages 37 and 1047.
 * Exceptions: The characters for []^ have different codes in 37 & 1047.
 * Both versions are mapped to ASCII.
 *
 *    ASCII 37 1047
 * [     5B BA   AD
 * ]     5D BB   BD
 * ^     5E B0   5F
 *
 * There are no mappings for variant characters from Unicode to EBCDIC.
 *
 * Currently, C0 control codes are also included in these maps.
 * Exceptions: S/390 Open Edition swaps LF and NEL codes compared with other
 * EBCDIC platforms; both codes (15 and 25) are mapped to ASCII LF (0A),
 * but there is no mapping for ASCII LF back to EBCDIC.
 *
 *    ASCII EBCDIC S/390-OE
 * LF    0A     25       15
 * NEL   85     15       25
 *
 * The maps below explicitly exclude the variant
 * control and graphical characters that are in ASCII-based
 * codepages at 0x80 and above.
 * "No mapping" is expressed by mapping to a 00 byte.
 *
 * These tables do not establish a converter or a codepage.
 */

static const uint8_t asciiFromEbcdic[256]={
    0x00, 0x01, 0x02, 0x03, 0x00, 0x09, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    0x10, 0x11, 0x12, 0x13, 0x00, 0x0a, 0x08, 0x00, 0x18, 0x19, 0x00, 0x00, 0x1c, 0x1d, 0x1e, 0x1f,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x17, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x07,
    0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x00, 0x1a,

    0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x3c, 0x28, 0x2b, 0x7c,
    0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x5e,
    0x2d, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x25, 0x5f, 0x3e, 0x3f,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22,

    0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x7e, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,
    0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x5d, 0x00, 0x5d, 0x00, 0x00,

    0x7b, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x7d, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x5c, 0x00, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

static const uint8_t ebcdicFromAscii[256]={
    0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, 0x16, 0x05, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f,
    0x40, 0x00, 0x7f, 0x00, 0x00, 0x6c, 0x50, 0x7d, 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61,
    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f,

    0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,
    0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0x00, 0x00, 0x00, 0x00, 0x6d,
    0x00, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
    0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x07,

    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};

/* Same as asciiFromEbcdic[] except maps all letters to lowercase. */
static const uint8_t lowercaseAsciiFromEbcdic[256]={
    0x00, 0x01, 0x02, 0x03, 0x00, 0x09, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    0x10, 0x11, 0x12, 0x13, 0x00, 0x0a, 0x08, 0x00, 0x18, 0x19, 0x00, 0x00, 0x1c, 0x1d, 0x1e, 0x1f,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x17, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x07,
    0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x00, 0x1a,

    0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x3c, 0x28, 0x2b, 0x7c,
    0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x5e,
    0x2d, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x25, 0x5f, 0x3e, 0x3f,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22,

    0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x7e, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00,
    0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x5d, 0x00, 0x5d, 0x00, 0x00,

    0x7b, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x7d, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x7c, 0x00, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

/*
 * Bit sets indicating which characters of the ASCII repertoire
 * (by ASCII/Unicode code) are "invariant".
 * See utypes.h for more details.
 *
 * As invariant are considered the characters of the ASCII repertoire except
 * for the following:
 * 21  '!' <exclamation mark>
 * 23  '#' <number sign>
 * 24  '$' <dollar sign>
 *
 * 40  '@' <commercial at>
 *
 * 5b  '[' <left bracket>
 * 5c  '\' <backslash>
 * 5d  ']' <right bracket>
 * 5e  '^' <circumflex>
 *
 * 60  '`' <grave accent>
 *
 * 7b  '{' <left brace>
 * 7c  '|' <vertical line>
 * 7d  '}' <right brace>
 * 7e  '~' <tilde>
 */
static const uint32_t invariantChars[4]={
    0xfffffbff, /* 00..1f but not 0a */
    0xffffffe5, /* 20..3f but not 21 23 24 */
    0x87fffffe, /* 40..5f but not 40 5b..5e */
    0x87fffffe  /* 60..7f but not 60 7b..7e */
};

/*
 * test unsigned types (or values known to be non-negative) for invariant characters,
 * tests ASCII-family character values
 */
#define UCHAR_IS_INVARIANT(c) (((c)<=0x7f) && (invariantChars[(c)>>5]&((uint32_t)1<<((c)&0x1f)))!=0)

/* test signed types for invariant characters, adds test for positive values */
#define SCHAR_IS_INVARIANT(c) ((0<=(c)) && UCHAR_IS_INVARIANT(c))

#if U_CHARSET_FAMILY==U_ASCII_FAMILY
#define CHAR_TO_UCHAR(c) c
#define UCHAR_TO_CHAR(c) c
#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
#define CHAR_TO_UCHAR(u) asciiFromEbcdic[u]
#define UCHAR_TO_CHAR(u) ebcdicFromAscii[u]
#else
#   error U_CHARSET_FAMILY is not valid
#endif

U_CAPI void U_EXPORT2
u_charsToUChars(const char *cs, UChar *us, int32_t length) {
    UChar u;
    uint8_t c;

    /*
     * Allow the entire ASCII repertoire to be mapped _to_ Unicode.
     * For EBCDIC systems, this works for characters with codes from
     * codepages 37 and 1047 or compatible.
     */
    while(length>0) {
        c=(uint8_t)(*cs++);
        u=(UChar)CHAR_TO_UCHAR(c);
        U_ASSERT((u!=0 || c==0)); /* only invariant chars converted? */
        *us++=u;
        --length;
    }
}

U_CAPI void U_EXPORT2
u_UCharsToChars(const UChar *us, char *cs, int32_t length) {
    UChar u;

    while(length>0) {
        u=*us++;
        if(!UCHAR_IS_INVARIANT(u)) {
            U_ASSERT(FALSE); /* Variant characters were used. These are not portable in ICU. */
            u=0;
        }
        *cs++=(char)UCHAR_TO_CHAR(u);
        --length;
    }
}

U_CAPI UBool U_EXPORT2
uprv_isInvariantString(const char *s, int32_t length) {
    uint8_t c;

    for(;;) {
        if(length<0) {
            /* NUL-terminated */
            c=(uint8_t)*s++;
            if(c==0) {
                break;
            }
        } else {
            /* count length */
            if(length==0) {
                break;
            }
            --length;
            c=(uint8_t)*s++;
            if(c==0) {
                continue; /* NUL is invariant */
            }
        }
        /* c!=0 now, one branch below checks c==0 for variant characters */

        /*
         * no assertions here because these functions are legitimately called
         * for strings with variant characters
         */
#if U_CHARSET_FAMILY==U_ASCII_FAMILY
        if(!UCHAR_IS_INVARIANT(c)) {
            return FALSE; /* found a variant char */
        }
#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
        c=CHAR_TO_UCHAR(c);
        if(c==0 || !UCHAR_IS_INVARIANT(c)) {
            return FALSE; /* found a variant char */
        }
#else
#   error U_CHARSET_FAMILY is not valid
#endif
    }
    return TRUE;
}

U_CAPI UBool U_EXPORT2
uprv_isInvariantUString(const UChar *s, int32_t length) {
    UChar c;

    for(;;) {
        if(length<0) {
            /* NUL-terminated */
            c=*s++;
            if(c==0) {
                break;
            }
        } else {
            /* count length */
            if(length==0) {
                break;
            }
            --length;
            c=*s++;
        }

        /*
         * no assertions here because these functions are legitimately called
         * for strings with variant characters
         */
        if(!UCHAR_IS_INVARIANT(c)) {
            return FALSE; /* found a variant char */
        }
    }
    return TRUE;
}

/* UDataSwapFn implementations used in udataswp.c ------- */

/* convert ASCII to EBCDIC and verify that all characters are invariant */
U_CAPI int32_t U_EXPORT2
uprv_ebcdicFromAscii(const UDataSwapper *ds,
                     const void *inData, int32_t length, void *outData,
                     UErrorCode *pErrorCode) {
    const uint8_t *s;
    uint8_t *t;
    uint8_t c;

    int32_t count;

    if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
        return 0;
    }
    if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
        return 0;
    }

    /* setup and swapping */
    s=(const uint8_t *)inData;
    t=(uint8_t *)outData;
    count=length;
    while(count>0) {
        c=*s++;
        if(!UCHAR_IS_INVARIANT(c)) {
            udata_printError(ds, "uprv_ebcdicFromAscii() string[%d] contains a variant character in position %d\n",
                             length, length-count);
            *pErrorCode=U_INVALID_CHAR_FOUND;
            return 0;
        }
        *t++=ebcdicFromAscii[c];
        --count;
    }

    return length;
}

/* this function only checks and copies ASCII strings without conversion */
U_CFUNC int32_t
uprv_copyAscii(const UDataSwapper *ds,
               const void *inData, int32_t length, void *outData,
               UErrorCode *pErrorCode) {
    const uint8_t *s;
    uint8_t c;

    int32_t count;

    if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
        return 0;
    }
    if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
        return 0;
    }

    /* setup and checking */
    s=(const uint8_t *)inData;
    count=length;
    while(count>0) {
        c=*s++;
        if(!UCHAR_IS_INVARIANT(c)) {
            udata_printError(ds, "uprv_copyFromAscii() string[%d] contains a variant character in position %d\n",
                             length, length-count);
            *pErrorCode=U_INVALID_CHAR_FOUND;
            return 0;
        }
        --count;
    }

    if(length>0 && inData!=outData) {
        uprv_memcpy(outData, inData, length);
    }

    return length;
}

/* convert EBCDIC to ASCII and verify that all characters are invariant */
U_CFUNC int32_t
uprv_asciiFromEbcdic(const UDataSwapper *ds,
                     const void *inData, int32_t length, void *outData,
                     UErrorCode *pErrorCode) {
    const uint8_t *s;
    uint8_t *t;
    uint8_t c;

    int32_t count;

    if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
        return 0;
    }
    if(ds==NULL || inData==NULL || length<0 ||  (length>0 && outData==NULL)) {
        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
        return 0;
    }

    /* setup and swapping */
    s=(const uint8_t *)inData;
    t=(uint8_t *)outData;
    count=length;
    while(count>0) {
        c=*s++;
        if(c!=0 && ((c=asciiFromEbcdic[c])==0 || !UCHAR_IS_INVARIANT(c))) {
            udata_printError(ds, "uprv_asciiFromEbcdic() string[%d] contains a variant character in position %d\n",
                             length, length-count);
            *pErrorCode=U_INVALID_CHAR_FOUND;
            return 0;
        }
        *t++=c;
        --count;
    }

    return length;
}

/* this function only checks and copies EBCDIC strings without conversion */
U_CFUNC int32_t
uprv_copyEbcdic(const UDataSwapper *ds,
                const void *inData, int32_t length, void *outData,
                UErrorCode *pErrorCode) {
    const uint8_t *s;
    uint8_t c;

    int32_t count;

    if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
        return 0;
    }
    if(ds==NULL || inData==NULL || length<0 || (length>0 && outData==NULL)) {
        *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
        return 0;
    }

    /* setup and checking */
    s=(const uint8_t *)inData;
    count=length;
    while(count>0) {
        c=*s++;
        if(c!=0 && ((c=asciiFromEbcdic[c])==0 || !UCHAR_IS_INVARIANT(c))) {
            udata_printError(ds, "uprv_copyEbcdic() string[%] contains a variant character in position %d\n",
                             length, length-count);
            *pErrorCode=U_INVALID_CHAR_FOUND;
            return 0;
        }
        --count;
    }

    if(length>0 && inData!=outData) {
        uprv_memcpy(outData, inData, length);
    }

    return length;
}

U_CFUNC UBool
uprv_isEbcdicAtSign(char c) {
    static const uint8_t ebcdicAtSigns[] = {
        0x7C, 0x44, 0x66, 0x80, 0xAC, 0xAE, 0xAF, 0xB5, 0xEC, 0xEF, 0x00 };
    return c != 0 && uprv_strchr((const char *)ebcdicAtSigns, c) != nullptr;
}

/* compare invariant strings; variant characters compare less than others and unlike each other */
U_CFUNC int32_t
uprv_compareInvAscii(const UDataSwapper *ds,
                     const char *outString, int32_t outLength,
                     const UChar *localString, int32_t localLength) {
    (void)ds;
    int32_t minLength;
    UChar32 c1, c2;
    uint8_t c;

    if(outString==NULL || outLength<-1 || localString==NULL || localLength<-1) {
        return 0;
    }

    if(outLength<0) {
        outLength=(int32_t)uprv_strlen(outString);
    }
    if(localLength<0) {
        localLength=u_strlen(localString);
    }

    minLength= outLength<localLength ? outLength : localLength;

    while(minLength>0) {
        c=(uint8_t)*outString++;
        if(UCHAR_IS_INVARIANT(c)) {
            c1=c;
        } else {
            c1=-1;
        }

        c2=*localString++;
        if(!UCHAR_IS_INVARIANT(c2)) {
            c2=-2;
        }

        if((c1-=c2)!=0) {
            return c1;
        }

        --minLength;
    }

    /* strings start with same prefix, compare lengths */
    return outLength-localLength;
}

U_CFUNC int32_t
uprv_compareInvEbcdic(const UDataSwapper *ds,
                      const char *outString, int32_t outLength,
                      const UChar *localString, int32_t localLength) {
    (void)ds;
    int32_t minLength;
    UChar32 c1, c2;
    uint8_t c;

    if(outString==NULL || outLength<-1 || localString==NULL || localLength<-1) {
        return 0;
    }

    if(outLength<0) {
        outLength=(int32_t)uprv_strlen(outString);
    }
    if(localLength<0) {
        localLength=u_strlen(localString);
    }

    minLength= outLength<localLength ? outLength : localLength;

    while(minLength>0) {
        c=(uint8_t)*outString++;
        if(c==0) {
            c1=0;
        } else if((c1=asciiFromEbcdic[c])!=0 && UCHAR_IS_INVARIANT(c1)) {
            /* c1 is set */
        } else {
            c1=-1;
        }

        c2=*localString++;
        if(!UCHAR_IS_INVARIANT(c2)) {
            c2=-2;
        }

        if((c1-=c2)!=0) {
            return c1;
        }

        --minLength;
    }

    /* strings start with same prefix, compare lengths */
    return outLength-localLength;
}

U_CAPI int32_t U_EXPORT2
uprv_compareInvEbcdicAsAscii(const char *s1, const char *s2) {
    int32_t c1, c2;

    for(;; ++s1, ++s2) {
        c1=(uint8_t)*s1;
        c2=(uint8_t)*s2;
        if(c1!=c2) {
            if(c1!=0 && ((c1=asciiFromEbcdic[c1])==0 || !UCHAR_IS_INVARIANT(c1))) {
                c1=-(int32_t)(uint8_t)*s1;
            }
            if(c2!=0 && ((c2=asciiFromEbcdic[c2])==0 || !UCHAR_IS_INVARIANT(c2))) {
                c2=-(int32_t)(uint8_t)*s2;
            }
            return c1-c2;
        } else if(c1==0) {
            return 0;
        }
    }
}

U_CAPI char U_EXPORT2
uprv_ebcdicToAscii(char c) {
    return (char)asciiFromEbcdic[(uint8_t)c];
}

U_CAPI char U_EXPORT2
uprv_ebcdicToLowercaseAscii(char c) {
    return (char)lowercaseAsciiFromEbcdic[(uint8_t)c];
}

U_INTERNAL uint8_t* U_EXPORT2
uprv_aestrncpy(uint8_t *dst, const uint8_t *src, int32_t n)
{
  uint8_t *orig_dst = dst;

  if(n==-1) {
    n = static_cast<int32_t>(uprv_strlen((const char*)src)+1); /* copy NUL */
  }
  /* copy non-null */
  while(*src && n>0) {
    *(dst++) = asciiFromEbcdic[*(src++)];
    n--;
  }
  /* pad */
  while(n>0) {
    *(dst++) = 0;
    n--;
  }
  return orig_dst;
}

U_INTERNAL uint8_t* U_EXPORT2
uprv_eastrncpy(uint8_t *dst, const uint8_t *src, int32_t n)
{
  uint8_t *orig_dst = dst;

  if(n==-1) {
    n = static_cast<int32_t>(uprv_strlen((const char*)src)+1); /* copy NUL */
  }
  /* copy non-null */
  while(*src && n>0) {
    char ch = ebcdicFromAscii[*(src++)];
    if(ch == 0) {
      ch = ebcdicFromAscii[0x3f]; /* questionmark (subchar) */
    }
    *(dst++) = ch;
    n--;
  }
  /* pad */
  while(n>0) {
    *(dst++) = 0;
    n--;
  }
  return orig_dst;
}