<div dir="ltr">Yeah, that makes sense. What’s interesting, though, is that the GDAL Python bindings have no trouble retrieving the list of files inside the archive:<div><br><font face="monospace">>>> from osgeo import gdal<br>>>> gdal.ReadDir("/vsirar/arch.rar")</font></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Aug 20, 2025 at 10:24 PM Rahkonen Jukka <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Perhaps the key is in the message "to current locale." When I have seen something similar on Windows and when using my default code page 850, changing the code page into 65001 (UTF-8) has often helped. But I have never met  UTF-16BE data.<br>
<br>
-Jukka Rahkonen-<br>
<br>
________________________________________<br>
Lähettäjä: gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>> käyttäjän Denis Rykov via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>> puolesta<br>
Lähetetty: keskiviikko 20. elokuuta 2025 23.11<br>
Vastaanottaja: gdal dev<br>
Aihe: [gdal-dev] Issue opening RAR archive with non-latin filenames<br>
<br>
Hello,<br>
<br>
I’m having trouble opening a RAR archive containing files with non-Latin characters using GDAL:<br>
<br>
$ docker run --rm -v `pwd`/arch.rar:/arch.rar:ro -e CPL_DEBUG=ON <a href="http://ghcr.io/osgeo/gdal:ubuntu-full-3.11.3" rel="noreferrer" target="_blank">ghcr.io/osgeo/gdal:ubuntu-full-3.11.3</a><<a href="http://ghcr.io/osgeo/gdal:ubuntu-full-3.11.3" rel="noreferrer" target="_blank">http://ghcr.io/osgeo/gdal:ubuntu-full-3.11.3</a>> gdalinfo "/vsirar/arch.rar"<br>
VSIARCH: Opening arch.rar<br>
VSIARCH: Pathname cannot be converted from UTF-16BE to current locale.<br>
VSIARCH: Opening arch.rar<br>
VSIARCH: Pathname cannot be converted from UTF-16BE to current locale.<br>
ERROR 4: `/vsirar/arch.rar' does not exist in the file system, and is not recognized as a supported dataset name.<br>
gdalinfo failed - unable to open '/vsirar/arch.rar'.<br>
<br>
It seems the issue is related to the non-Latin filenames in the archive. Using unrar, I can extract the files and list them without any problem.<br>
Is there any workaround to make GDAL handle such RAR archives correctly?<br>
<br>
Thank you!<br>
</blockquote></div>