Opened 8 years ago

Closed 8 years ago

#6410 closed defect (fixed)

'Recode from UTF-8 to CP_OEMCP failed' in /vsizip on Windows

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 2.0.3
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

IRC discussion

[14:05] <jef> EvenR: should I build with HAVE_ICONV on windows?   Looks like CP_OEMCP is used in related to /vsizip/, which iconv doesn't know about.
[14:05] <EvenR>  jef: do you mean that you've already ICONV support and that causes problems ?
[14:07] <-- Raeburn1687 a quitté ce serveur (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
[14:07] <jef> EvenR: yes.  I build "as usual" and I get: Recode from UTF-8 to CP_OEMCP failed with the error: "No such file or directory" when using vsizip.   with HAVE_ICONV it works
[14:07] <jef> s/with/&out/
[14:08] <jef> no, vice versa - but anyway
[14:10] <EvenR> jef: I think the issue is https://github.com/OSGeo/gdal/blob/trunk/gdal/port/cpl_minizip_unzip.cpp#L1022 . The line should be #if defined(_WIN32) && !defined(HAVE_ICONV).  iconv support may be useful for other areas, mainly when dealing with shapefiles
[14:10] <sigq> Title: gdal/cpl_minizip_unzip.cpp at trunk · OSGeo/gdal · GitHub (at github.com)
[14:10] <EvenR> hum now that reminds me why some strange failures on tests occured on some Windows targets
[14:12] <EvenR> jef: could you test locally my above suggested fix ? if that works, I'll push it
[14:12] <jef> EvenR: sure (btw my issue is http://hub.qgis.org/issues/14440)
[14:12] <sigq> Title: QGIS Application - Bug report #14440: QGIS 2.15.0-10 (GDAL 2.0.2-4) without vsizip support - QGIS Issue Tracking (at hub.qgis.org)
[14:13] <-- sigq a quitté ce serveur (Remote host closed the connection).
[14:14] --> sigq a rejoint ce canal (~supybot@qgis/bot/sigq).
[14:15] <EvenR> I see this was implemented in https://trac.osgeo.org/gdal/ticket/5361 . So the issue should have already been there in 1.11 (if built with ICONV). A workaround would be to define CPL_ZIP_ENCODING=CP437 as environmenet variable
[14:15] <sigq> Title: #5361 (/vsizip: troubles with cyrillic filenames) – GDAL (at trac.osgeo.org)
[14:16] --> lossyrob a rejoint ce canal (~Rob@207.59.237.131).
[14:18] <jef> EvenR: yes, that works.  thanks
[14:18] <jef> EvenR: the #if that is.

Change History (1)

comment:1 by Even Rouault, 8 years ago

Milestone: 2.0.3
Resolution: fixed
Status: newclosed

trunk r33688, branches/2.0 r33689 "/vsizip/: use CP437 on Windows when ICONV support is available (#6410)"

Note: See TracTickets for help on using tickets.