diff --git a/include/osmium/io/detail/read_write.hpp b/include/osmium/io/detail/read_write.hpp index dffc6e7e..c90e3765 100644 --- a/include/osmium/io/detail/read_write.hpp +++ b/include/osmium/io/detail/read_write.hpp @@ -104,6 +104,9 @@ namespace osmium { #endif if (filename.empty() || filename == "-") { +#ifdef _WIN32 + _setmode(0, _O_BINARY); +#endif return 0; // stdin }