[gdal-dev] Issue opening RAR archive with non-latin filenames
Denis Rykov
rykovd at gmail.com
Thu Aug 21 07:17:34 PDT 2025
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:
>>> from osgeo import gdal
>>> gdal.ReadDir("/vsirar/arch.rar")
On Wed, Aug 20, 2025 at 10:24 PM Rahkonen Jukka <
jukka.rahkonen at maanmittauslaitos.fi> wrote:
> Hi,
>
> 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.
>
> -Jukka Rahkonen-
>
> ________________________________________
> Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> käyttäjän Denis
> Rykov via gdal-dev <gdal-dev at lists.osgeo.org> puolesta
> Lähetetty: keskiviikko 20. elokuuta 2025 23.11
> Vastaanottaja: gdal dev
> Aihe: [gdal-dev] Issue opening RAR archive with non-latin filenames
>
> Hello,
>
> I’m having trouble opening a RAR archive containing files with non-Latin
> characters using GDAL:
>
> $ docker run --rm -v `pwd`/arch.rar:/arch.rar:ro -e CPL_DEBUG=ON
> ghcr.io/osgeo/gdal:ubuntu-full-3.11.3<
> http://ghcr.io/osgeo/gdal:ubuntu-full-3.11.3> gdalinfo "/vsirar/arch.rar"
> VSIARCH: Opening arch.rar
> VSIARCH: Pathname cannot be converted from UTF-16BE to current locale.
> VSIARCH: Opening arch.rar
> VSIARCH: Pathname cannot be converted from UTF-16BE to current locale.
> ERROR 4: `/vsirar/arch.rar' does not exist in the file system, and is not
> recognized as a supported dataset name.
> gdalinfo failed - unable to open '/vsirar/arch.rar'.
>
> 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.
> Is there any workaround to make GDAL handle such RAR archives correctly?
>
> Thank you!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250821/c742fdf3/attachment.htm>
More information about the gdal-dev
mailing list