<p>I have found an "official workaround" of locale problem by Microsoft:<br>
<a href="https://msdn.microsoft.com/en-us/library/ms235302.aspx">https://msdn.microsoft.com/en-us/library/ms235302.aspx</a></p>

<p>Here is the patch: <a href="https://github.com/lonvia/osm2pgsql/pull/3" class="issue-link" title="workaround for multithreading locale problem in GEOS">lonvia#3</a><br>
If included, the bug is gone even without switching to WKB (however WKB may be cleaner and faster).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/osm2pgsql/pull/498#issuecomment-156081940">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7j_2mmbwXRSFXB_jk5k-WrN3CCfDks5pFHNLgaJpZM4GeIs1.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/openstreetmap/osm2pgsql/pull/498#issuecomment-156081940"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>