<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi all and thanks for the discussion,</p>
<p>Even and I discovered that the .xls files are loading with correct encoding in Linux but not on Windows which leads to the assumption that freexl on Windows might not have been correctly compiled/linked against iconv.</p>
<p>Something that maybe Jürgen could clarify?</p>
<p>Thanks,</p>
<p>Andreas</p>
<p id="reply-intro">On 2021-07-15 23:14, Andrea Giudiceandrea wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><span style="white-space: nowrap;">Il 15/07/2021 22:30, Nyall Dawson ha scritto:</span>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">I don't think that's completely correct -- looking at the freexl documentation it seems that only some xls file versions are utf8, and others have a codepage indicating the encoding which needs to be read from the xls metadata:</blockquote>
<br />Yes, of course BIFF5 (and previous versions), which is used until Excel 95, stores internally the strings with a codepage based encoding, while BIFF8 (since Excel 98), stores them internally as UTF-16LE without the need of codepages.<br /><br />Anyway the documentation states that: "FreeXL is intended to be strictly interoperable with SQLite and SpatiaLite, so any text string has to be converted to UTF-8 encoding. GNU libiconv can easily handle any required charset conversion. So we can simply fetch the appropriate bytes, then call iconv() as appropriate, and we'll immediately get back the corresponding UTF-8 encoded text string."<br /><br />So, if I'm not mistaken, the decoding from the proper internal codec and the encoding to UTF-8 is handled by the FreeXL library for both BIFF2/BIFF5 and BIFF8.<br />I've also tested a BIFF5 XLS using ogrinfo, and the output is UTF-8 encoded, while internally<br /><br /><span style="white-space: nowrap;">Regards.</span><br /><br />Andrea<br />_______________________________________________<br /><span style="white-space: nowrap;">QGIS-Developer mailing list</span><br /><span style="white-space: nowrap;"><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a></span><br /><span style="white-space: nowrap;">List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></span><br /><span style="white-space: nowrap;">Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></span></div>
</blockquote>
<p><br /></p>
</body></html>