<p>I did a bit of thinking and digging, and I wanted to see if you are willing to try two things:</p>

<ul>
<li>opening the file as binary on Windows.  This can be done by modifying <code>load_impl.hpp</code> at line 64 to be something like this:</li>
</ul>

<pre><code>#ifdef _WIN32
  stream.open(filename.c_str(), std::fstream::in | std::fstream::binary);
#else
  stream.open(filename.c_str(), std::fstream::in);
#endif
</code></pre>

<p>You'd have to make that change for a couple of functions; both overloads of <code>Load()</code> in <code>load_impl.hpp</code> and both overloads of <code>Save()</code> in <code>save_impl.hpp</code>.  If that fixes your load issues and the SerializationTest output, we can take that as a fix.  Or...</p>

<ul>
<li>Change the condition in <code>guess_file_type()</code> inside of Armadillo.  It seems possible to me that the '\r' character is not being stripped properly when read under Windows, and this is causing the file to be detected as binary.  So modifying the conditional that I mentioned in the previous comment could fix that.</li>
</ul>

<p>Like I've mentioned before, I don't have a good working Windows system (and at the current moment I don't have time to set one up), so unfortunately fixing this one will either be up to you (but I'm happy to help how I can!) or someone else who reads this ticket and happens to be developing on Windows.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/468#issuecomment-158934838">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOZWLn9-B1gvOax2XMRRvsEZ3nzTks5pIw4AgaJpZM4Gd7SI.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/468#issuecomment-158934838"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>