From ed5b5db339f28f40056cf8e393457c9e7f79013a Mon Sep 17 00:00:00 2001
From: Evan Ramos <Hendricks266@gmail.com>
Date: Fri, 8 Jan 2016 15:52:51 -0600
Subject: [PATCH] Move win_utf8_io from its own library into libFLAC.

---
 FLAC-vs2005.sln                                    |   2 -
 FLAC.sln                                           |   2 -
 Makefile.deps                                      |   7 -
 Makefile.lite                                      |   4 +-
 examples/c/decode/file/Makefile.lite               |   4 -
 .../c/decode/file/example_c_decode_file.vcxproj    |   4 -
 examples/c/encode/file/Makefile.lite               |   4 -
 .../c/encode/file/example_c_encode_file.vcxproj    |   4 -
 examples/cpp/decode/file/Makefile.lite             |   4 -
 .../decode/file/example_cpp_decode_file.vcxproj    |   4 -
 examples/cpp/encode/file/Makefile.lite             |   4 -
 .../encode/file/example_cpp_encode_file.vcxproj    |   4 -
 src/Makefile.lite                                  |   8 +-
 src/flac/Makefile.lite                             |   4 -
 src/flac/Makefile.lite.iffscan                     |   4 -
 src/flac/flac.vcxproj                              |   4 -
 src/flac/iffscan.vcxproj                           |   4 -
 src/libFLAC++/Makefile.lite                        |   4 -
 src/libFLAC++/libFLAC++_dynamic.vcxproj            |   4 -
 src/libFLAC++/libFLAC++_static.vcxproj             |   4 -
 src/libFLAC/Makefile.am                            |  12 +-
 src/libFLAC/Makefile.lite                          |   9 +-
 src/libFLAC/libFLAC_dynamic.vcproj                 |   8 +
 src/libFLAC/libFLAC_dynamic.vcxproj                |   6 +-
 src/libFLAC/libFLAC_dynamic.vcxproj.filters        |   6 +
 src/libFLAC/libFLAC_static.vcproj                  |   8 +
 src/libFLAC/libFLAC_static.vcxproj                 |   7 +-
 src/libFLAC/libFLAC_static.vcxproj.filters         |   6 +
 src/libFLAC/win_utf8_io.c                          | 382 +++++++++++++++++++++
 src/metaflac/Makefile.lite                         |   4 -
 src/metaflac/metaflac.vcxproj                      |   4 -
 src/plugin_common/Makefile.lite                    |   4 -
 src/plugin_common/plugin_common_static.vcxproj     |   4 -
 src/plugin_xmms/Makefile.lite                      |   4 -
 src/share/Makefile.am                              |  15 +-
 src/share/Makefile.lite                            |   4 -
 src/share/grabbag/Makefile.lite                    |   4 -
 src/share/grabbag/grabbag_static.vcxproj           |   4 -
 src/share/win_utf8_io/Makefile.lite                |  15 -
 src/share/win_utf8_io/win_utf8_io.c                | 382 ---------------------
 src/share/win_utf8_io/win_utf8_io_static.vcproj    | 174 ----------
 src/share/win_utf8_io/win_utf8_io_static.vcxproj   | 140 --------
 .../win_utf8_io/win_utf8_io_static.vcxproj.filters |  22 --
 src/test_grabbag/cuesheet/Makefile.lite            |   4 -
 src/test_grabbag/cuesheet/test_cuesheet.vcxproj    |   4 -
 src/test_grabbag/picture/Makefile.lite             |   4 -
 src/test_grabbag/picture/test_picture.vcxproj      |   4 -
 src/test_libFLAC++/Makefile.lite                   |   4 -
 src/test_libFLAC++/test_libFLAC++.vcxproj          |   4 -
 src/test_libFLAC/Makefile.am                       |   6 +-
 src/test_libFLAC/Makefile.lite                     |   4 -
 src/test_libFLAC/test_libFLAC.vcxproj              |   4 -
 src/test_libs_common/Makefile.lite                 |   4 -
 .../test_libs_common_static.vcxproj                |   4 -
 src/test_seeking/Makefile.lite                     |   4 -
 src/test_seeking/test_seeking.vcxproj              |   4 -
 src/test_streams/Makefile.am                       |   6 +-
 src/test_streams/Makefile.lite                     |   8 +-
 src/test_streams/test_streams.vcxproj              |   4 -
 src/utils/flacdiff/Makefile.lite                   |   4 -
 src/utils/flacdiff/flacdiff.vcxproj                |   4 -
 src/utils/flactimer/Makefile.lite                  |   4 -
 62 files changed, 435 insertions(+), 956 deletions(-)
 create mode 100644 src/libFLAC/win_utf8_io.c
 delete mode 100644 src/share/win_utf8_io/Makefile.lite
 delete mode 100644 src/share/win_utf8_io/win_utf8_io.c
 delete mode 100644 src/share/win_utf8_io/win_utf8_io_static.vcproj
 delete mode 100644 src/share/win_utf8_io/win_utf8_io_static.vcxproj
 delete mode 100644 src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters

diff --git a/FLAC-vs2005.sln b/FLAC-vs2005.sln
index db4d6b5..05e98d5 100644
--- a/FLAC-vs2005.sln
+++ b/FLAC-vs2005.sln
@@ -152,8 +152,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_streams", "src\test_st
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utf8_static", "src\share\utf8\utf8_static.vcproj", "{4CEFBC92-C215-11DB-8314-0800200C9A66}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_utf8_io_static", "src\share\win_utf8_io\win_utf8_io_static.vcproj", "{4CEFBE02-C215-11DB-8314-0800200C9A66}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
diff --git a/FLAC.sln b/FLAC.sln
index e16ac9e..c127743 100644
--- a/FLAC.sln
+++ b/FLAC.sln
@@ -55,8 +55,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_streams", "src\test_st
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utf8_static", "src\share\utf8\utf8_static.vcxproj", "{4CEFBC92-C215-11DB-8314-0800200C9A66}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_utf8_io_static", "src\share\win_utf8_io\win_utf8_io_static.vcxproj", "{4CEFBE02-C215-11DB-8314-0800200C9A66}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
diff --git a/Makefile.deps b/Makefile.deps
index c262daa..ce13a00 100644
--- a/Makefile.deps
+++ b/Makefile.deps
@@ -16,13 +16,6 @@
 #  restrictive of those mentioned above.  See the file COPYING.Xiph in this
 #  distribution.
 
-ifeq ($(findstring Windows,$(OS)),Windows) # "Windows" is provided by GNU Make's internal $(OS)
-    LIBFLAC_DEPS = share/win_utf8_io
-else
-    LIBFLAC_DEPS =
-endif
-
-libFLAC: $(LIBFLAC_DEPS)
 flac: libFLAC share
 libFLAC++: libFLAC
 metaflac: libFLAC share
diff --git a/Makefile.lite b/Makefile.lite
index 4453474..6c2a982 100644
--- a/Makefile.lite
+++ b/Makefile.lite
@@ -31,7 +31,7 @@
 
 topdir = .
 
-.PHONY: all doc src examples libFLAC libFLAC++ share/win_utf8_io share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
+.PHONY: all doc src examples libFLAC libFLAC++ share plugin_common flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
 all: src examples
 
 DEFAULT_CONFIG = release
@@ -52,7 +52,7 @@ doc:
 src examples:
 	(cd $@ && $(MAKE) -f Makefile.lite $(CONFIG))
 
-libFLAC libFLAC++ share/win_utf8_io share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
+libFLAC libFLAC++ share flac metaflac plugin_common plugin_xmms test_libs_common test_seeking test_streams test_grabbag test_libFLAC test_libFLAC++:
 	(cd src/$@ && $(MAKE) -f Makefile.lite $(CONFIG))
 
 flacdiff flactimer:
diff --git a/examples/c/decode/file/Makefile.lite b/examples/c/decode/file/Makefile.lite
index c0b52e3..c24eeb5 100644
--- a/examples/c/decode/file/Makefile.lite
+++ b/examples/c/decode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = main.c
 
diff --git a/examples/c/decode/file/example_c_decode_file.vcxproj b/examples/c/decode/file/example_c_decode_file.vcxproj
index 3b16664..db14265 100644
--- a/examples/c/decode/file/example_c_decode_file.vcxproj
+++ b/examples/c/decode/file/example_c_decode_file.vcxproj
@@ -172,10 +172,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/examples/c/encode/file/Makefile.lite b/examples/c/encode/file/Makefile.lite
index 9bae4b9..07f147e 100644
--- a/examples/c/encode/file/Makefile.lite
+++ b/examples/c/encode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = main.c
 
diff --git a/examples/c/encode/file/example_c_encode_file.vcxproj b/examples/c/encode/file/example_c_encode_file.vcxproj
index 60bf39c..edf464b 100644
--- a/examples/c/encode/file/example_c_encode_file.vcxproj
+++ b/examples/c/encode/file/example_c_encode_file.vcxproj
@@ -172,10 +172,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/examples/cpp/decode/file/Makefile.lite b/examples/cpp/decode/file/Makefile.lite
index fe9a31a..b559edc 100644
--- a/examples/cpp/decode/file/Makefile.lite
+++ b/examples/cpp/decode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = main.cpp
 
diff --git a/examples/cpp/decode/file/example_cpp_decode_file.vcxproj b/examples/cpp/decode/file/example_cpp_decode_file.vcxproj
index d105bb4..6dde67e 100644
--- a/examples/cpp/decode/file/example_cpp_decode_file.vcxproj
+++ b/examples/cpp/decode/file/example_cpp_decode_file.vcxproj
@@ -176,10 +176,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/examples/cpp/encode/file/Makefile.lite b/examples/cpp/encode/file/Makefile.lite
index cc5583f..43a952e 100644
--- a/examples/cpp/encode/file/Makefile.lite
+++ b/examples/cpp/encode/file/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = main.cpp
 
diff --git a/examples/cpp/encode/file/example_cpp_encode_file.vcxproj b/examples/cpp/encode/file/example_cpp_encode_file.vcxproj
index 793f62c..271b50a 100644
--- a/examples/cpp/encode/file/example_cpp_encode_file.vcxproj
+++ b/examples/cpp/encode/file/example_cpp_encode_file.vcxproj
@@ -176,10 +176,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\..\src\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/Makefile.lite b/src/Makefile.lite
index 8b92816..6f80508 100644
--- a/src/Makefile.lite
+++ b/src/Makefile.lite
@@ -31,11 +31,7 @@ else
 endif
 endif
 
-ifeq ($(findstring Windows,$(OS)),Windows)
-    EXTRA_TARGETS += share/win_utf8_io
-endif
-
-.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
+.PHONY: all flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams flacdiff flactimer
 all: flac libFLAC libFLAC++ metaflac plugin_common $(EXTRA_TARGETS) share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams
 
 DEFAULT_CONFIG = release
@@ -50,7 +46,7 @@ debug   : all
 valgrind: all
 release : all
 
-flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share/win_utf8_io share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams:
+flac libFLAC libFLAC++ metaflac plugin_common plugin_xmms share test_grabbag test_libs_common test_libFLAC test_libFLAC++ test_seeking test_streams:
 	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
 
 flacdiff flactimer:
diff --git a/src/flac/Makefile.lite b/src/flac/Makefile.lite
index f143bd4..a5e35af 100644
--- a/src/flac/Makefile.lite
+++ b/src/flac/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	analyze.c \
diff --git a/src/flac/Makefile.lite.iffscan b/src/flac/Makefile.lite.iffscan
index 90bf3cc..fa06f18 100644
--- a/src/flac/Makefile.lite.iffscan
+++ b/src/flac/Makefile.lite.iffscan
@@ -30,12 +30,8 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	foreign_metadata.c \
diff --git a/src/flac/flac.vcxproj b/src/flac/flac.vcxproj
index ac7f4ea..70b50cc 100644
--- a/src/flac/flac.vcxproj
+++ b/src/flac/flac.vcxproj
@@ -208,10 +208,6 @@
       <Project>{4cefbc92-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/flac/iffscan.vcxproj b/src/flac/iffscan.vcxproj
index 98b5076..530fb9e 100644
--- a/src/flac/iffscan.vcxproj
+++ b/src/flac/iffscan.vcxproj
@@ -180,10 +180,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC++/Makefile.lite b/src/libFLAC++/Makefile.lite
index 800d3e7..6ddd941 100644
--- a/src/libFLAC++/Makefile.lite
+++ b/src/libFLAC++/Makefile.lite
@@ -43,16 +43,12 @@ endif
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm -lstdc++
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm -lsupc++
-else
 ifeq ($(OS),FreeBSD)
     LIBS = -lFLAC $(OGG_LIBS) -lm -lstdc++
 else
     LIBS = -lFLAC $(OGG_LIBS) -lm -lsupc++
 endif
 endif
-endif
 
 LIB_NAME = libFLAC++
 INCLUDES = -I$(topdir)/include
diff --git a/src/libFLAC++/libFLAC++_dynamic.vcxproj b/src/libFLAC++/libFLAC++_dynamic.vcxproj
index e79e2dc..12b4fb0 100644
--- a/src/libFLAC++/libFLAC++_dynamic.vcxproj
+++ b/src/libFLAC++/libFLAC++_dynamic.vcxproj
@@ -173,10 +173,6 @@
       <Project>{4cefbc83-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC++/libFLAC++_static.vcxproj b/src/libFLAC++/libFLAC++_static.vcxproj
index d45f1ee..21994bd 100644
--- a/src/libFLAC++/libFLAC++_static.vcxproj
+++ b/src/libFLAC++/libFLAC++_static.vcxproj
@@ -141,10 +141,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am
index 276e334..50eca09 100644
--- a/src/libFLAC/Makefile.am
+++ b/src/libFLAC/Makefile.am
@@ -61,11 +61,7 @@ endif
 endif
 endif
 
-if OS_IS_WINDOWS
-win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
-endif
-
-libFLAC_la_LIBADD = $(win_utf8_lib) $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ -lm
+libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ -lm
 
 SUBDIRS = $(ARCH_SUBDIRS) include .
 
@@ -86,6 +82,11 @@ EXTRA_DIST = \
 	libFLAC_static.vcxproj.filters \
 	libFLAC.m4
 
+if OS_IS_WINDOWS
+extra_windows_sources = \
+	win_utf8_io.c
+endif
+
 if FLaC__HAS_OGG
 extra_ogg_sources = \
 	ogg_decoder_aspect.c \
@@ -124,6 +125,7 @@ libFLAC_sources = \
 	stream_encoder_intrin_avx2.c \
 	stream_encoder_framing.c \
 	window.c \
+	$(extra_windows_sources) \
 	$(extra_ogg_sources)
 
 libFLAC_la_SOURCES = $(libFLAC_sources)
diff --git a/src/libFLAC/Makefile.lite b/src/libFLAC/Makefile.lite
index 722acfb..c097e5f 100644
--- a/src/libFLAC/Makefile.lite
+++ b/src/libFLAC/Makefile.lite
@@ -38,12 +38,8 @@ topdir = ../..
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = $(OGG_LIBS) -lm
 endif
-endif
 
 LIB_NAME = libFLAC
 ifeq ($(PROC),ppc)
@@ -75,6 +71,10 @@ OGG_SRCS_C = \
 	ogg_helper.c \
 	ogg_mapping.c
 
+ifeq ($(findstring Windows,$(OS)),Windows)
+	WINDOWS_SRCS_C = win_utf8_io.c
+endif
+
 SRCS_C = \
 	bitmath.c \
 	bitreader.c \
@@ -102,6 +102,7 @@ SRCS_C = \
 	stream_encoder_intrin_avx2.c \
 	stream_encoder_framing.c \
 	window.c \
+	$(WINDOWS_SRCS_C) \
 	$(OGG_SRCS)
 
 include $(topdir)/build/lib.mk
diff --git a/src/libFLAC/libFLAC_dynamic.vcproj b/src/libFLAC/libFLAC_dynamic.vcproj
index d372d34..cce6b0a 100644
--- a/src/libFLAC/libFLAC_dynamic.vcproj
+++ b/src/libFLAC/libFLAC_dynamic.vcproj
@@ -395,6 +395,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\win_utf8_io.c"
+				>
+			</File>
+			<File
 				RelativePath=".\window.c"
 				>
 			</File>
@@ -438,6 +442,10 @@
 				RelativePath="..\..\include\FLAC\stream_encoder.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\share\win_utf8_io.h"
+				>
+			</File>
 		</Filter>
 		<File
 			RelativePath=".\ia32\cpu_asm.nasm"
diff --git a/src/libFLAC/libFLAC_dynamic.vcxproj b/src/libFLAC/libFLAC_dynamic.vcxproj
index 89f24e2..1a88207 100644
--- a/src/libFLAC/libFLAC_dynamic.vcxproj
+++ b/src/libFLAC/libFLAC_dynamic.vcxproj
@@ -184,6 +184,7 @@
     <ClInclude Include="..\..\include\FLAC\ordinals.h" />
     <ClInclude Include="..\..\include\FLAC\stream_decoder.h" />
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h" />
+    <ClInclude Include="..\..\include\share\win_utf8_io.h" />
     <ClInclude Include="ia32\nasm.h" />
     <ClInclude Include="include\private\all.h" />
     <ClInclude Include="include\private\bitmath.h" />
@@ -249,6 +250,7 @@
     </ClCompile>
     <ClCompile Include="stream_encoder_intrin_sse2.c" />
     <ClCompile Include="stream_encoder_intrin_ssse3.c" />
+    <ClCompile Include="win_utf8_io.c" />
     <ClCompile Include="window.c" />
   </ItemGroup>
   <ItemGroup>
@@ -314,10 +316,6 @@
     </CustomBuild>
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/libFLAC/libFLAC_dynamic.vcxproj.filters b/src/libFLAC/libFLAC_dynamic.vcxproj.filters
index fa79a8d..c5dddd8 100644
--- a/src/libFLAC/libFLAC_dynamic.vcxproj.filters
+++ b/src/libFLAC/libFLAC_dynamic.vcxproj.filters
@@ -113,6 +113,9 @@
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h">
       <Filter>Public Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\include\share\win_utf8_io.h">
+      <Filter>Public Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="bitmath.c">
@@ -202,6 +205,9 @@
     <ClCompile Include="stream_encoder_intrin_avx2.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="win_utf8_io.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="window.c">
       <Filter>Source Files</Filter>
     </ClCompile>
diff --git a/src/libFLAC/libFLAC_static.vcproj b/src/libFLAC/libFLAC_static.vcproj
index fe0ac58..48f3d66 100644
--- a/src/libFLAC/libFLAC_static.vcproj
+++ b/src/libFLAC/libFLAC_static.vcproj
@@ -293,6 +293,10 @@
 				RelativePath="..\..\include\FLAC\stream_encoder.h"
 				>
 			</File>
+			<File
+				RelativePath="..\..\include\share\win_utf8_io.h"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Source Files"
@@ -408,6 +412,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\win_utf8_io.c"
+				>
+			</File>
+			<File
 				RelativePath=".\window.c"
 				>
 			</File>
diff --git a/src/libFLAC/libFLAC_static.vcxproj b/src/libFLAC/libFLAC_static.vcxproj
index 8cc1902..c25eab1 100644
--- a/src/libFLAC/libFLAC_static.vcxproj
+++ b/src/libFLAC/libFLAC_static.vcxproj
@@ -144,6 +144,7 @@
     <ClInclude Include="..\..\include\FLAC\ordinals.h" />
     <ClInclude Include="..\..\include\FLAC\stream_decoder.h" />
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h" />
+    <ClInclude Include="..\..\include\share\win_utf8_io.h" />
     <ClInclude Include="ia32\nasm.h" />
     <ClInclude Include="include\private\all.h" />
     <ClInclude Include="include\private\bitmath.h" />
@@ -209,6 +210,7 @@
     </ClCompile>
     <ClCompile Include="stream_encoder_intrin_sse2.c" />
     <ClCompile Include="stream_encoder_intrin_ssse3.c" />
+    <ClCompile Include="win_utf8_io.c" />
     <ClCompile Include="window.c" />
   </ItemGroup>
   <ItemGroup>
@@ -273,11 +275,6 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </CustomBuild>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
diff --git a/src/libFLAC/libFLAC_static.vcxproj.filters b/src/libFLAC/libFLAC_static.vcxproj.filters
index bc99bf3..cce6a48 100644
--- a/src/libFLAC/libFLAC_static.vcxproj.filters
+++ b/src/libFLAC/libFLAC_static.vcxproj.filters
@@ -113,6 +113,9 @@
     <ClInclude Include="..\..\include\FLAC\stream_encoder.h">
       <Filter>Public Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\include\share\win_utf8_io.h">
+      <Filter>Public Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="bitmath.c">
@@ -202,6 +205,9 @@
     <ClCompile Include="stream_encoder_intrin_avx2.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="win_utf8_io.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="window.c">
       <Filter>Source Files</Filter>
     </ClCompile>
diff --git a/src/libFLAC/win_utf8_io.c b/src/libFLAC/win_utf8_io.c
new file mode 100644
index 0000000..846b971
--- /dev/null
+++ b/src/libFLAC/win_utf8_io.c
@@ -0,0 +1,382 @@
+/* libFLAC - Free Lossless Audio Codec library
+ * Copyright (C) 2013-2014  Xiph.Org Foundation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the Xiph.org Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/utime.h>
+#include <io.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h> /* for WideCharToMultiByte and MultiByteToWideChar */
+
+#include "share/win_utf8_io.h"
+
+#define UTF8_BUFFER_SIZE 32768
+
+static
+int local_vsnprintf(char *str, size_t size, const char *fmt, va_list va)
+{
+	int rc;
+
+#if defined _MSC_VER
+	if (size == 0)
+		return 1024;
+	rc = vsnprintf_s (str, size, _TRUNCATE, fmt, va);
+	if (rc < 0)
+		rc = size - 1;
+#elif defined __MINGW32__
+	rc = __mingw_vsnprintf (str, size, fmt, va);
+#else
+	rc = vsnprintf (str, size, fmt, va);
+#endif
+
+	return rc;
+}
+
+static UINT win_utf8_io_codepage = CP_ACP;
+
+/* convert WCHAR stored Unicode string to UTF-8. Caller is responsible for freeing memory */
+static
+char *utf8_from_wchar(const wchar_t *wstr)
+{
+	char *utf8str;
+	int len;
+
+	if (!wstr) return NULL;
+	if ((len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL)) == 0) return NULL;
+	if ((utf8str = (char *)malloc(++len)) == NULL) return NULL;
+	if (WideCharToMultiByte(CP_UTF8, 0, wstr, -1, utf8str, len, NULL, NULL) == 0) {
+		free(utf8str);
+		utf8str = NULL;
+	}
+
+	return utf8str;
+}
+
+/* convert UTF-8 back to WCHAR. Caller is responsible for freeing memory */
+static
+wchar_t *wchar_from_utf8(const char *str)
+{
+	wchar_t *widestr;
+	int len;
+
+	if (!str) return NULL;
+	len=(int)strlen(str)+1;
+	if ((widestr = (wchar_t *)malloc(len*sizeof(wchar_t))) != NULL) {
+		if (MultiByteToWideChar(win_utf8_io_codepage, 0, str, len, widestr, len) == 0) {
+			if (MultiByteToWideChar(CP_ACP, 0, str, len, widestr, len) == 0) { /* try conversion from Ansi in case the initial UTF-8 conversion had failed */
+				free(widestr);
+				widestr = NULL;
+			}
+		}
+	}
+
+	return widestr;
+}
+
+/* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */
+int get_utf8_argv(int *argc, char ***argv)
+{
+	typedef int (__cdecl *wgetmainargs_t)(int*, wchar_t***, wchar_t***, int, int*);
+	wgetmainargs_t wgetmainargs;
+	HMODULE handle;
+	int wargc;
+	wchar_t **wargv;
+	wchar_t **wenv;
+	char **utf8argv;
+	int ret, i;
+
+	if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1;
+	if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) {
+		FreeLibrary(handle);
+		return 1;
+	}
+	i = 0;
+	/* if __wgetmainargs expands wildcards then it also erroneously converts \\?\c:\path\to\file.flac to \\file.flac */
+	if (wgetmainargs(&wargc, &wargv, &wenv, 1, &i) != 0) {
+		FreeLibrary(handle);
+		return 1;
+	}
+	if ((utf8argv = (char **)calloc(wargc, sizeof(char*))) == NULL) {
+		FreeLibrary(handle);
+		return 1;
+	}
+
+	ret = 0;
+	for (i=0; i<wargc; i++) {
+		if ((utf8argv[i] = utf8_from_wchar(wargv[i])) == NULL) {
+			ret = 1;
+			break;
+		}
+	}
+
+	FreeLibrary(handle); /* do not free it when wargv or wenv are still in use */
+
+	if (ret == 0) {
+		win_utf8_io_codepage = CP_UTF8;
+		*argc = wargc;
+		*argv = utf8argv;
+	} else {
+		for (i=0; i<wargc; i++)
+			free(utf8argv[i]);
+		free(utf8argv);
+	}
+
+	return ret;
+}
+
+/* return number of characters in the UTF-8 string */
+size_t strlen_utf8(const char *str)
+{
+	size_t len;
+	if ((len = MultiByteToWideChar(win_utf8_io_codepage, 0, str, -1, NULL, 0)) == 0)
+		len = strlen(str);
+	return len;
+}
+
+/* get the console width in characters */
+int win_get_console_width(void)
+{
+	int width = 80;
+	CONSOLE_SCREEN_BUFFER_INFO csbi;
+	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
+	if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) width = csbi.dwSize.X;
+	return width;
+}
+
+/* print functions */
+
+int print_console(FILE *stream, const wchar_t *text, size_t len)
+{
+	static HANDLE hOut;
+	static HANDLE hErr;
+	DWORD out;
+	hOut = GetStdHandle(STD_OUTPUT_HANDLE);
+	hErr = GetStdHandle(STD_ERROR_HANDLE);
+	if (stream == stdout && hOut != INVALID_HANDLE_VALUE && GetFileType(hOut) == FILE_TYPE_CHAR) {
+		if (WriteConsoleW(hOut, text, len, &out, NULL) == 0) return -1;
+		return out;
+	} else if (stream == stderr && hErr != INVALID_HANDLE_VALUE && GetFileType(hErr) == FILE_TYPE_CHAR) {
+		if (WriteConsoleW(hErr, text, len, &out, NULL) == 0) return -1;
+		return out;
+	} else {
+		int ret = fputws(text, stream);
+		if (ret < 0) return ret;
+		return len;
+	}
+}
+
+int printf_utf8(const char *format, ...)
+{
+	char *utmp = NULL;
+	wchar_t *wout = NULL;
+	int ret = -1;
+
+	while (1) {
+		va_list argptr;
+		if (!(utmp = (char *)malloc(UTF8_BUFFER_SIZE*sizeof(char)))) break;
+		va_start(argptr, format);
+		ret = local_vsnprintf(utmp, UTF8_BUFFER_SIZE, format, argptr);
+		va_end(argptr);
+		if (ret < 0) break;
+		if (!(wout = wchar_from_utf8(utmp))) {
+			ret = -1;
+			break;
+		}
+		ret = print_console(stdout, wout, wcslen(wout));
+		break;
+	}
+	if (utmp) free(utmp);
+	if (wout) free(wout);
+
+	return ret;
+}
+
+int fprintf_utf8(FILE *stream, const char *format, ...)
+{
+	char *utmp = NULL;
+	wchar_t *wout = NULL;
+	int ret = -1;
+
+	while (1) {
+		va_list argptr;
+		if (!(utmp = (char *)malloc(UTF8_BUFFER_SIZE*sizeof(char)))) break;
+		va_start(argptr, format);
+		ret = local_vsnprintf(utmp, UTF8_BUFFER_SIZE, format, argptr);
+		va_end(argptr);
+		if (ret < 0) break;
+		if (!(wout = wchar_from_utf8(utmp))) {
+			ret = -1;
+			break;
+		}
+		ret = print_console(stream, wout, wcslen(wout));
+		break;
+	}
+	if (utmp) free(utmp);
+	if (wout) free(wout);
+
+	return ret;
+}
+
+int vfprintf_utf8(FILE *stream, const char *format, va_list argptr)
+{
+	char *utmp = NULL;
+	wchar_t *wout = NULL;
+	int ret = -1;
+
+	while (1) {
+		if (!(utmp = (char *)malloc(UTF8_BUFFER_SIZE*sizeof(char)))) break;
+		if ((ret = local_vsnprintf(utmp, UTF8_BUFFER_SIZE, format, argptr)) < 0) break;
+		if (!(wout = wchar_from_utf8(utmp))) {
+			ret = -1;
+			break;
+		}
+		ret = print_console(stream, wout, wcslen(wout));
+		break;
+	}
+	if (utmp) free(utmp);
+	if (wout) free(wout);
+
+	return ret;
+}
+
+/* file functions */
+
+FILE *fopen_utf8(const char *filename, const char *mode)
+{
+	wchar_t *wname = NULL;
+	wchar_t *wmode = NULL;
+	FILE *f = NULL;
+
+	while (1) {
+		if (!(wname = wchar_from_utf8(filename))) break;
+		if (!(wmode = wchar_from_utf8(mode))) break;
+		f = _wfopen(wname, wmode);
+		break;
+	}
+	if (wname) free(wname);
+	if (wmode) free(wmode);
+
+	return f;
+}
+
+int _stat64_utf8(const char *path, struct __stat64 *buffer)
+{
+	wchar_t *wpath;
+	int ret;
+
+	if (!(wpath = wchar_from_utf8(path))) return -1;
+	ret = _wstat64(wpath, buffer);
+	free(wpath);
+
+	return ret;
+}
+
+int chmod_utf8(const char *filename, int pmode)
+{
+	wchar_t *wname;
+	int ret;
+
+	if (!(wname = wchar_from_utf8(filename))) return -1;
+	ret = _wchmod(wname, pmode);
+	free(wname);
+
+	return ret;
+}
+
+int utime_utf8(const char *filename, struct utimbuf *times)
+{
+	wchar_t *wname;
+	struct __utimbuf64 ut;
+	int ret;
+
+	if (sizeof(*times) == sizeof(ut)) {
+		memcpy(&ut, times, sizeof(ut));
+	} else {
+		ut.actime = times->actime;
+		ut.modtime = times->modtime;
+	}
+
+	if (!(wname = wchar_from_utf8(filename))) return -1;
+	ret = _wutime64(wname, &ut);
+	free(wname);
+
+	return ret;
+}
+
+int unlink_utf8(const char *filename)
+{
+	wchar_t *wname;
+	int ret;
+
+	if (!(wname = wchar_from_utf8(filename))) return -1;
+	ret = _wunlink(wname);
+	free(wname);
+
+	return ret;
+}
+
+int rename_utf8(const char *oldname, const char *newname)
+{
+	wchar_t *wold = NULL;
+	wchar_t *wnew = NULL;
+	int ret = -1;
+
+	while (1) {
+		if (!(wold = wchar_from_utf8(oldname))) break;
+		if (!(wnew = wchar_from_utf8(newname))) break;
+		ret = _wrename(wold, wnew);
+		break;
+	}
+	if (wold) free(wold);
+	if (wnew) free(wnew);
+
+	return ret;
+}
+
+HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
+{
+	wchar_t *wname;
+	HANDLE handle = INVALID_HANDLE_VALUE;
+
+	if ((wname = wchar_from_utf8(lpFileName)) != NULL) {
+		handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
+		free(wname);
+	}
+
+	return handle;
+}
diff --git a/src/metaflac/Makefile.lite b/src/metaflac/Makefile.lite
index 2866c22..b0580a8 100644
--- a/src/metaflac/Makefile.lite
+++ b/src/metaflac/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include $(OGG_INCLUDES)
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(libdir)/libgetopt.a $(libdir)/libutf8.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lgrabbag $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c \
diff --git a/src/metaflac/metaflac.vcxproj b/src/metaflac/metaflac.vcxproj
index 54d584f..2f5894a 100644
--- a/src/metaflac/metaflac.vcxproj
+++ b/src/metaflac/metaflac.vcxproj
@@ -203,10 +203,6 @@
       <Project>{4cefbc92-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/plugin_common/Makefile.lite b/src/plugin_common/Makefile.lite
index 7d9683a..673f1db 100644
--- a/src/plugin_common/Makefile.lite
+++ b/src/plugin_common/Makefile.lite
@@ -28,12 +28,8 @@ INCLUDES = -I$(topdir)/include -I$(HOME)/local/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	charset.c \
diff --git a/src/plugin_common/plugin_common_static.vcxproj b/src/plugin_common/plugin_common_static.vcxproj
index 880dbcc..411c18c 100644
--- a/src/plugin_common/plugin_common_static.vcxproj
+++ b/src/plugin_common/plugin_common_static.vcxproj
@@ -151,10 +151,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/plugin_xmms/Makefile.lite b/src/plugin_xmms/Makefile.lite
index ec101a3..b713f6d 100644
--- a/src/plugin_xmms/Makefile.lite
+++ b/src/plugin_xmms/Makefile.lite
@@ -29,12 +29,8 @@ INCLUDES  = -I./include -I$(topdir)/include -I.. $(shell xmms-config --cflags)
 ifeq ($(OS),Darwin)
     LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_EXPLICIT_LIBS) $(ICONV_LIBS) -lm -lstdc++ -lz
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(libdir)/libwin_utf8_io.a $(OGG_LIBS) -lm -lsupc++ -lz
-else
     LIBS = $(libdir)/libFLAC.a $(libdir)/libplugin_common.a $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libreplaygain_synthesis.a $(OGG_LIBS) -lm -lsupc++ -lz
 endif
-endif
 
 SRCS_C = \
 	charset.c \
diff --git a/src/share/Makefile.am b/src/share/Makefile.am
index c2feb6e..67af43d 100644
--- a/src/share/Makefile.am
+++ b/src/share/Makefile.am
@@ -47,30 +47,17 @@ EXTRA_DIST = \
 	utf8/iconvert.h \
 	utf8/utf8_static.vcproj \
 	utf8/utf8_static.vcxproj \
-	utf8/utf8_static.vcxproj.filters \
-	win_utf8_io/win_utf8_io_static.vcproj \
-	win_utf8_io/win_utf8_io_static.vcxproj \
-	win_utf8_io/win_utf8_io_static.vcxproj.filters
+	utf8/utf8_static.vcxproj.filters
 
 
 noinst_LTLIBRARIES = \
 	getopt/libgetopt.la \
 	grabbag/libgrabbag.la \
 	utf8/libutf8.la \
-	$(libwin_utf8_io) \
 	replaygain_analysis/libreplaygain_analysis.la \
 	replaygain_synthesis/libreplaygain_synthesis.la
 
 
-if OS_IS_WINDOWS
-win_utf8_io_libwin_utf8_io_la_SOURCES =	win_utf8_io/win_utf8_io.c
-libwin_utf8_io = win_utf8_io/libwin_utf8_io.la
-else
-win_utf8_io_libwin_utf8_io_la_SOURCES =
-libwin_utf8_io =
-endif
-
-
 getopt_libgetopt_la_SOURCES = getopt/getopt.c getopt/getopt1.c
 
 grabbag_libgrabbag_la_SOURCES = \
diff --git a/src/share/Makefile.lite b/src/share/Makefile.lite
index c4558d6..24dcf6f 100644
--- a/src/share/Makefile.lite
+++ b/src/share/Makefile.lite
@@ -46,13 +46,9 @@ replaygain_synthesis:
 utf8:
 	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
 
-win_utf8_io:
-	(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
-
 clean:
 	-(cd getopt ; $(MAKE) -f Makefile.lite clean)
 	-(cd grabbag ; $(MAKE) -f Makefile.lite clean)
 	-(cd replaygain_analysis ; $(MAKE) -f Makefile.lite clean)
 	-(cd replaygain_synthesis ; $(MAKE) -f Makefile.lite clean)
 	-(cd utf8 ; $(MAKE) -f Makefile.lite clean)
-	-(cd win_utf8_io ; $(MAKE) -f Makefile.lite clean)
diff --git a/src/share/grabbag/Makefile.lite b/src/share/grabbag/Makefile.lite
index 4eac54b..7860cc5 100644
--- a/src/share/grabbag/Makefile.lite
+++ b/src/share/grabbag/Makefile.lite
@@ -8,12 +8,8 @@ libdir = $(topdir)/objs/$(BUILD)/lib
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(libdir)/libreplaygain_analysis.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lreplaygain_analysis -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC -lreplaygain_analysis $(OGG_LIBS) -lm
 endif
-endif
 
 LIB_NAME = libgrabbag
 INCLUDES = -I$(topdir)/include
diff --git a/src/share/grabbag/grabbag_static.vcxproj b/src/share/grabbag/grabbag_static.vcxproj
index 8ae6a28..8e7b6fd 100644
--- a/src/share/grabbag/grabbag_static.vcxproj
+++ b/src/share/grabbag/grabbag_static.vcxproj
@@ -154,10 +154,6 @@
       <Project>{4cefbc89-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/share/win_utf8_io/Makefile.lite b/src/share/win_utf8_io/Makefile.lite
deleted file mode 100644
index b941b07..0000000
--- a/src/share/win_utf8_io/Makefile.lite
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# GNU makefile
-#
-
-topdir = ../../..
-
-LIB_NAME = libwin_utf8_io
-INCLUDES = -I$(topdir)/include
-
-SRCS_C = \
-	win_utf8_io.c
-
-include $(topdir)/build/lib.mk
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
deleted file mode 100644
index 846b971..0000000
--- a/src/share/win_utf8_io/win_utf8_io.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* libFLAC - Free Lossless Audio Codec library
- * Copyright (C) 2013-2014  Xiph.Org Foundation
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * - Neither the name of the Xiph.org Foundation nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/utime.h>
-#include <io.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h> /* for WideCharToMultiByte and MultiByteToWideChar */
-
-#include "share/win_utf8_io.h"
-
-#define UTF8_BUFFER_SIZE 32768
-
-static
-int local_vsnprintf(char *str, size_t size, const char *fmt, va_list va)
-{
-	int rc;
-
-#if defined _MSC_VER
-	if (size == 0)
-		return 1024;
-	rc = vsnprintf_s (str, size, _TRUNCATE, fmt, va);
-	if (rc < 0)
-		rc = size - 1;
-#elif defined __MINGW32__
-	rc = __mingw_vsnprintf (str, size, fmt, va);
-#else
-	rc = vsnprintf (str, size, fmt, va);
-#endif
-
-	return rc;
-}
-
-static UINT win_utf8_io_codepage = CP_ACP;
-
-/* convert WCHAR stored Unicode string to UTF-8. Caller is responsible for freeing memory */
-static
-char *utf8_from_wchar(const wchar_t *wstr)
-{
-	char *utf8str;
-	int len;
-
-	if (!wstr) return NULL;
-	if ((len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL)) == 0) return NULL;
-	if ((utf8str = (char *)malloc(++len)) == NULL) return NULL;
-	if (WideCharToMultiByte(CP_UTF8, 0, wstr, -1, utf8str, len, NULL, NULL) == 0) {
-		free(utf8str);
-		utf8str = NULL;
-	}
-
-	return utf8str;
-}
-
-/* convert UTF-8 back to WCHAR. Caller is responsible for freeing memory */
-static
-wchar_t *wchar_from_utf8(const char *str)
-{
-	wchar_t *widestr;
-	int len;
-
-	if (!str) return NULL;
-	len=(int)strlen(str)+1;
-	if ((widestr = (wchar_t *)malloc(len*sizeof(wchar_t))) != NULL) {
-		if (MultiByteToWideChar(win_utf8_io_codepage, 0, str, len, widestr, len) == 0) {
-			if (MultiByteToWideChar(CP_ACP, 0, str, len, widestr, len) == 0) { /* try conversion from Ansi in case the initial UTF-8 conversion had failed */
-				free(widestr);
-				widestr = NULL;
-			}
-		}
-	}
-
-	return widestr;
-}
-
-/* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */
-int get_utf8_argv(int *argc, char ***argv)
-{
-	typedef int (__cdecl *wgetmainargs_t)(int*, wchar_t***, wchar_t***, int, int*);
-	wgetmainargs_t wgetmainargs;
-	HMODULE handle;
-	int wargc;
-	wchar_t **wargv;
-	wchar_t **wenv;
-	char **utf8argv;
-	int ret, i;
-
-	if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1;
-	if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) {
-		FreeLibrary(handle);
-		return 1;
-	}
-	i = 0;
-	/* if __wgetmainargs expands wildcards then it also erroneously converts \\?\c:\path\to\file.flac to \\file.flac */
-	if (wgetmainargs(&wargc, &wargv, &wenv, 1, &i) != 0) {
-		FreeLibrary(handle);
-		return 1;
-	}
-	if ((utf8argv = (char **)calloc(wargc, sizeof(char*))) == NULL) {
-		FreeLibrary(handle);
-		return 1;
-	}
-
-	ret = 0;
-	for (i=0; i<wargc; i++) {
-		if ((utf8argv[i] = utf8_from_wchar(wargv[i])) == NULL) {
-			ret = 1;
-			break;
-		}
-	}
-
-	FreeLibrary(handle); /* do not free it when wargv or wenv are still in use */
-
-	if (ret == 0) {
-		win_utf8_io_codepage = CP_UTF8;
-		*argc = wargc;
-		*argv = utf8argv;
-	} else {
-		for (i=0; i<wargc; i++)
-			free(utf8argv[i]);
-		free(utf8argv);
-	}
-
-	return ret;
-}
-
-/* return number of characters in the UTF-8 string */
-size_t strlen_utf8(const char *str)
-{
-	size_t len;
-	if ((len = MultiByteToWideChar(win_utf8_io_codepage, 0, str, -1, NULL, 0)) == 0)
-		len = strlen(str);
-	return len;
-}
-
-/* get the console width in characters */
-int win_get_console_width(void)
-{
-	int width = 80;
-	CONSOLE_SCREEN_BUFFER_INFO csbi;
-	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
-	if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) width = csbi.dwSize.X;
-	return width;
-}
-
-/* print functions */
-
-int print_console(FILE *stream, const wchar_t *text, size_t len)
-{
-	static HANDLE hOut;
-	static HANDLE hErr;
-	DWORD out;
-	hOut = GetStdHandle(STD_OUTPUT_HANDLE);
-	hErr = GetStdHandle(STD_ERROR_HANDLE);
-	if (stream == stdout && hOut != INVALID_HANDLE_VALUE && GetFileType(hOut) == FILE_TYPE_CHAR) {
-		if (WriteConsoleW(hOut, text, len, &out, NULL) == 0) return -1;
-		return out;
-	} else if (stream == stderr && hErr != INVALID_HANDLE_VALUE && GetFileType(hErr) == FILE_TYPE_CHAR) {
-		if (WriteConsoleW(hErr, text, len, &out, NULL) == 0) return -1;
-		return out;
-	} else {
-		int ret = fputws(text, stream);
-		if (ret < 0) return ret;
-		return len;
-	}
-}
-
-int printf_utf8(const char *format, ...)
-{
-	char *utmp = NULL;
-	wchar_t *wout = NULL;
-	int ret = -1;
-
-	while (1) {
-		va_list argptr;
-		if (!(utmp = (char *)malloc(UTF8_BUFFER_SIZE*sizeof(char)))) break;
-		va_start(argptr, format);
-		ret = local_vsnprintf(utmp, UTF8_BUFFER_SIZE, format, argptr);
-		va_end(argptr);
-		if (ret < 0) break;
-		if (!(wout = wchar_from_utf8(utmp))) {
-			ret = -1;
-			break;
-		}
-		ret = print_console(stdout, wout, wcslen(wout));
-		break;
-	}
-	if (utmp) free(utmp);
-	if (wout) free(wout);
-
-	return ret;
-}
-
-int fprintf_utf8(FILE *stream, const char *format, ...)
-{
-	char *utmp = NULL;
-	wchar_t *wout = NULL;
-	int ret = -1;
-
-	while (1) {
-		va_list argptr;
-		if (!(utmp = (char *)malloc(UTF8_BUFFER_SIZE*sizeof(char)))) break;
-		va_start(argptr, format);
-		ret = local_vsnprintf(utmp, UTF8_BUFFER_SIZE, format, argptr);
-		va_end(argptr);
-		if (ret < 0) break;
-		if (!(wout = wchar_from_utf8(utmp))) {
-			ret = -1;
-			break;
-		}
-		ret = print_console(stream, wout, wcslen(wout));
-		break;
-	}
-	if (utmp) free(utmp);
-	if (wout) free(wout);
-
-	return ret;
-}
-
-int vfprintf_utf8(FILE *stream, const char *format, va_list argptr)
-{
-	char *utmp = NULL;
-	wchar_t *wout = NULL;
-	int ret = -1;
-
-	while (1) {
-		if (!(utmp = (char *)malloc(UTF8_BUFFER_SIZE*sizeof(char)))) break;
-		if ((ret = local_vsnprintf(utmp, UTF8_BUFFER_SIZE, format, argptr)) < 0) break;
-		if (!(wout = wchar_from_utf8(utmp))) {
-			ret = -1;
-			break;
-		}
-		ret = print_console(stream, wout, wcslen(wout));
-		break;
-	}
-	if (utmp) free(utmp);
-	if (wout) free(wout);
-
-	return ret;
-}
-
-/* file functions */
-
-FILE *fopen_utf8(const char *filename, const char *mode)
-{
-	wchar_t *wname = NULL;
-	wchar_t *wmode = NULL;
-	FILE *f = NULL;
-
-	while (1) {
-		if (!(wname = wchar_from_utf8(filename))) break;
-		if (!(wmode = wchar_from_utf8(mode))) break;
-		f = _wfopen(wname, wmode);
-		break;
-	}
-	if (wname) free(wname);
-	if (wmode) free(wmode);
-
-	return f;
-}
-
-int _stat64_utf8(const char *path, struct __stat64 *buffer)
-{
-	wchar_t *wpath;
-	int ret;
-
-	if (!(wpath = wchar_from_utf8(path))) return -1;
-	ret = _wstat64(wpath, buffer);
-	free(wpath);
-
-	return ret;
-}
-
-int chmod_utf8(const char *filename, int pmode)
-{
-	wchar_t *wname;
-	int ret;
-
-	if (!(wname = wchar_from_utf8(filename))) return -1;
-	ret = _wchmod(wname, pmode);
-	free(wname);
-
-	return ret;
-}
-
-int utime_utf8(const char *filename, struct utimbuf *times)
-{
-	wchar_t *wname;
-	struct __utimbuf64 ut;
-	int ret;
-
-	if (sizeof(*times) == sizeof(ut)) {
-		memcpy(&ut, times, sizeof(ut));
-	} else {
-		ut.actime = times->actime;
-		ut.modtime = times->modtime;
-	}
-
-	if (!(wname = wchar_from_utf8(filename))) return -1;
-	ret = _wutime64(wname, &ut);
-	free(wname);
-
-	return ret;
-}
-
-int unlink_utf8(const char *filename)
-{
-	wchar_t *wname;
-	int ret;
-
-	if (!(wname = wchar_from_utf8(filename))) return -1;
-	ret = _wunlink(wname);
-	free(wname);
-
-	return ret;
-}
-
-int rename_utf8(const char *oldname, const char *newname)
-{
-	wchar_t *wold = NULL;
-	wchar_t *wnew = NULL;
-	int ret = -1;
-
-	while (1) {
-		if (!(wold = wchar_from_utf8(oldname))) break;
-		if (!(wnew = wchar_from_utf8(newname))) break;
-		ret = _wrename(wold, wnew);
-		break;
-	}
-	if (wold) free(wold);
-	if (wnew) free(wnew);
-
-	return ret;
-}
-
-HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
-{
-	wchar_t *wname;
-	HANDLE handle = INVALID_HANDLE_VALUE;
-
-	if ((wname = wchar_from_utf8(lpFileName)) != NULL) {
-		handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
-		free(wname);
-	}
-
-	return handle;
-}
diff --git a/src/share/win_utf8_io/win_utf8_io_static.vcproj b/src/share/win_utf8_io/win_utf8_io_static.vcproj
deleted file mode 100644
index 00eeea7..0000000
--- a/src/share/win_utf8_io/win_utf8_io_static.vcproj
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="win_utf8_io_static"
-	ProjectGUID="{4cefbe02-c215-11db-8314-0800200c9a66}"
-	RootNamespace="win_utf8_io_static"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)objs\$(ConfigurationName)\lib"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories=".\include;..\..\..\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-				CompileAs="0"
-				DisableSpecificWarnings="4267;4996"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)objs\$(ConfigurationName)\lib"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
-				OmitFramePointers="true"
-				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories=".\include;..\..\..\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLAC__NO_DLL"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-				CompileAs="0"
-				DisableSpecificWarnings="4267;4996"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Public Header Files"
-			>
-			<File
-				RelativePath="..\..\..\include\share\win_utf8_io.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath=".\win_utf8_io.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/src/share/win_utf8_io/win_utf8_io_static.vcxproj b/src/share/win_utf8_io/win_utf8_io_static.vcxproj
deleted file mode 100644
index aa9a3ee..0000000
--- a/src/share/win_utf8_io/win_utf8_io_static.vcxproj
+++ /dev/null
@@ -1,140 +0,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.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="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{4cefbe02-c215-11db-8314-0800200c9a66}</ProjectGuid>
-    <RootNamespace>win_utf8_io_static</RootNamespace>
-    <Keyword>Win32Proj</Keyword>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <OutDir>$(SolutionDir)objs\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <OutDir>$(SolutionDir)objs\$(Platform)\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <OutDir>$(SolutionDir)objs\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <OutDir>$(SolutionDir)objs\$(Platform)\$(Configuration)\lib\</OutDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;FLAC__NO_DLL;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <OmitFramePointers>true</OmitFramePointers>
-      <WholeProgramOptimization>true</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;FLAC__NO_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <OmitFramePointers>true</OmitFramePointers>
-      <WholeProgramOptimization>true</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.\include;..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;FLAC__NO_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <CompileAs>Default</CompileAs>
-      <DisableSpecificWarnings>4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\..\include\share\win_utf8_io.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="win_utf8_io.c" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
\ No newline at end of file
diff --git a/src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters b/src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters
deleted file mode 100644
index e44a0c7..0000000
--- a/src/share/win_utf8_io/win_utf8_io_static.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Public Header Files">
-      <UniqueIdentifier>{6469e7f2-0837-4004-9f36-27d45ed62336}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\..\include\share\win_utf8_io.h">
-      <Filter>Public Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="win_utf8_io.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/src/test_grabbag/cuesheet/Makefile.lite b/src/test_grabbag/cuesheet/Makefile.lite
index 9fe694d..5e77fea 100644
--- a/src/test_grabbag/cuesheet/Makefile.lite
+++ b/src/test_grabbag/cuesheet/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c
diff --git a/src/test_grabbag/cuesheet/test_cuesheet.vcxproj b/src/test_grabbag/cuesheet/test_cuesheet.vcxproj
index 790b234..c6b7896 100644
--- a/src/test_grabbag/cuesheet/test_cuesheet.vcxproj
+++ b/src/test_grabbag/cuesheet/test_cuesheet.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_grabbag/picture/Makefile.lite b/src/test_grabbag/picture/Makefile.lite
index 10ebfe0..fe57b4c 100644
--- a/src/test_grabbag/picture/Makefile.lite
+++ b/src/test_grabbag/picture/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I./include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c
diff --git a/src/test_grabbag/picture/test_picture.vcxproj b/src/test_grabbag/picture/test_picture.vcxproj
index cd2aa74..cb52126 100644
--- a/src/test_grabbag/picture/test_picture.vcxproj
+++ b/src/test_grabbag/picture/test_picture.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_libFLAC++/Makefile.lite b/src/test_libFLAC++/Makefile.lite
index 69d1a84..f520a6e 100644
--- a/src/test_libFLAC++/Makefile.lite
+++ b/src/test_libFLAC++/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
 	decoders.cpp \
diff --git a/src/test_libFLAC++/test_libFLAC++.vcxproj b/src/test_libFLAC++/test_libFLAC++.vcxproj
index 5baeb96..d3b302b 100644
--- a/src/test_libFLAC++/test_libFLAC++.vcxproj
+++ b/src/test_libFLAC++/test_libFLAC++.vcxproj
@@ -182,10 +182,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
     <ProjectReference Include="..\test_libs_common\test_libs_common_static.vcxproj">
       <Project>{4cefbc8e-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/src/test_libFLAC/Makefile.am b/src/test_libFLAC/Makefile.am
index b1bab02..ee93f94 100644
--- a/src/test_libFLAC/Makefile.am
+++ b/src/test_libFLAC/Makefile.am
@@ -26,16 +26,12 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(
 
 noinst_PROGRAMS = test_libFLAC
 
-if OS_IS_WINDOWS
-win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
-endif
-
 test_libFLAC_LDADD = \
 	$(top_builddir)/src/share/grabbag/libgrabbag.la \
 	$(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
 	$(top_builddir)/src/test_libs_common/libtest_libs_common.la \
 	$(top_builddir)/src/libFLAC/libFLAC-static.la \
-	$(win_utf8_lib) @OGG_LIBS@ \
+	@OGG_LIBS@ \
 	-lm
 
 test_libFLAC_SOURCES = \
diff --git a/src/test_libFLAC/Makefile.lite b/src/test_libFLAC/Makefile.lite
index e95beb3..2e1f816 100644
--- a/src/test_libFLAC/Makefile.lite
+++ b/src/test_libFLAC/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libreplaygain_analysis.a $(libdir)/libtest_libs_common.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lgrabbag -lreplaygain_analysis -ltest_libs_common -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	bitwriter.c \
diff --git a/src/test_libFLAC/test_libFLAC.vcxproj b/src/test_libFLAC/test_libFLAC.vcxproj
index 3151769..052c9d9 100644
--- a/src/test_libFLAC/test_libFLAC.vcxproj
+++ b/src/test_libFLAC/test_libFLAC.vcxproj
@@ -194,10 +194,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
     <ProjectReference Include="..\test_libs_common\test_libs_common_static.vcxproj">
       <Project>{4cefbc8e-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/src/test_libs_common/Makefile.lite b/src/test_libs_common/Makefile.lite
index abf2f1e..cb970a6 100644
--- a/src/test_libs_common/Makefile.lite
+++ b/src/test_libs_common/Makefile.lite
@@ -28,12 +28,8 @@ LIB_NAME = libtest_libs_common
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 INCLUDES = -I$(topdir)/include
 
diff --git a/src/test_libs_common/test_libs_common_static.vcxproj b/src/test_libs_common/test_libs_common_static.vcxproj
index 1e41c7b..812c8c3 100644
--- a/src/test_libs_common/test_libs_common_static.vcxproj
+++ b/src/test_libs_common/test_libs_common_static.vcxproj
@@ -137,10 +137,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_seeking/Makefile.lite b/src/test_seeking/Makefile.lite
index 5ada17d..b5fdc72 100644
--- a/src/test_seeking/Makefile.lite
+++ b/src/test_seeking/Makefile.lite
@@ -32,12 +32,8 @@ INCLUDES = -I../libFLAC/include -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_C = \
 	main.c
diff --git a/src/test_seeking/test_seeking.vcxproj b/src/test_seeking/test_seeking.vcxproj
index 71c3cff..cc20367 100644
--- a/src/test_seeking/test_seeking.vcxproj
+++ b/src/test_seeking/test_seeking.vcxproj
@@ -172,10 +172,6 @@
       <Project>{4cefbc84-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/test_streams/Makefile.am b/src/test_streams/Makefile.am
index ea9f19d..b181aee 100644
--- a/src/test_streams/Makefile.am
+++ b/src/test_streams/Makefile.am
@@ -27,10 +27,6 @@ noinst_PROGRAMS = test_streams
 test_streams_SOURCES = \
 	main.c
 
-if OS_IS_WINDOWS
-win_utf8_lib = $(top_builddir)/src/share/win_utf8_io/libwin_utf8_io.la
-endif
-
-test_streams_LDADD = $(win_utf8_lib) $(top_builddir)/src/share/grabbag/libgrabbag.la -lm
+test_streams_LDADD = $(top_builddir)/src/share/grabbag/libgrabbag.la -lm
 
 CLEANFILES = test_streams.exe
diff --git a/src/test_streams/Makefile.lite b/src/test_streams/Makefile.lite
index b144523..c033aa7 100644
--- a/src/test_streams/Makefile.lite
+++ b/src/test_streams/Makefile.lite
@@ -30,13 +30,9 @@ PROGRAM_NAME = test_streams
 INCLUDES = -I./include -I$(topdir)/include
 
 ifeq ($(OS),Darwin)
-    EXPLICIT_LIBS = $(libdir)/libgrabbag.a -lm
+    EXPLICIT_LIBS = $(libdir)/libgrabbag.a $(libdir)/libFLAC.a -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lgrabbag -lwin_utf8_io -lm
-else
-    LIBS = -lgrabbag -lm
-endif
+    LIBS = -lgrabbag -lFLAC -lm
 endif
 
 SRCS_C = \
diff --git a/src/test_streams/test_streams.vcxproj b/src/test_streams/test_streams.vcxproj
index f9d9cd2..037f9ab 100644
--- a/src/test_streams/test_streams.vcxproj
+++ b/src/test_streams/test_streams.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc81-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/utils/flacdiff/Makefile.lite b/src/utils/flacdiff/Makefile.lite
index e804723..adc7dcf 100644
--- a/src/utils/flacdiff/Makefile.lite
+++ b/src/utils/flacdiff/Makefile.lite
@@ -30,12 +30,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
 	main.cpp
diff --git a/src/utils/flacdiff/flacdiff.vcxproj b/src/utils/flacdiff/flacdiff.vcxproj
index 8987986..0b8592c 100644
--- a/src/utils/flacdiff/flacdiff.vcxproj
+++ b/src/utils/flacdiff/flacdiff.vcxproj
@@ -168,10 +168,6 @@
       <Project>{4cefbc86-c215-11db-8314-0800200c9a66}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\..\share\win_utf8_io\win_utf8_io_static.vcxproj">
-      <Project>{4cefbe02-c215-11db-8314-0800200c9a66}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/src/utils/flactimer/Makefile.lite b/src/utils/flactimer/Makefile.lite
index 1eb0759..8bacac1 100644
--- a/src/utils/flactimer/Makefile.lite
+++ b/src/utils/flactimer/Makefile.lite
@@ -30,12 +30,8 @@ INCLUDES = -I$(topdir)/include
 ifeq ($(OS),Darwin)
     EXPLICIT_LIBS = $(libdir)/libFLAC++.a $(libdir)/libFLAC.a $(OGG_EXPLICIT_LIBS) -lm
 else
-ifeq ($(findstring Windows,$(OS)),Windows)
-    LIBS = -lFLAC++ -lFLAC -lwin_utf8_io $(OGG_LIBS) -lm
-else
     LIBS = -lFLAC++ -lFLAC $(OGG_LIBS) -lm
 endif
-endif
 
 SRCS_CPP = \
 	main.cpp
-- 
2.6.0.windows.1

