From b6ffe04c462b27a470f77ddc3443985516a74c28 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Fri, 5 Feb 2016 21:20:25 +0100 Subject: [PATCH] Try to fix #3131 by opening the batch queue CSV file in binary mode to prevent any unwanted implicit text codec conversion on Windows. --- rtgui/batchqueue.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index c7d5f87e5..fd2af2074 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -217,7 +217,7 @@ bool BatchQueue::saveBatchQueue () { const auto fileName = Glib::build_filename (options.rtdir, "batch", "queue.csv"); - std::ofstream file (fileName, std::ios::trunc); + std::ofstream file (fileName, std::ios::binary | std::ios::trunc); if (!file.is_open ()) return false; @@ -256,7 +256,7 @@ bool BatchQueue::loadBatchQueue () { const auto fileName = Glib::build_filename (options.rtdir, "batch", "queue.csv"); - std::ifstream file (fileName); + std::ifstream file (fileName, std::ios::binary); if (file.is_open ()) { // Yes, it's better to get the lock for the whole file reading,