[gdal-dev] Unicode filenames
Frank Warmerdam
warmerdam at pobox.com
Fri Oct 8 16:12:02 EDT 2010
Ari Jolma wrote:
> Frank,
>
> Is RFC 30 supposed to mean that using GDALOpen can be used with utf8
> filenames? Are the changes made in trunk already?
Ari,
Yes, and Yes.
> I'm testing on Windows and I observe that opening a file using utf8
> filename does not succeed due to OpenInfo creation failing (the filename
> is still in utf8 at that point) and thus no driver picks up the file.
I don't understand this. Why would a utf-8 string interfere with the
creation of the GDALOpenInfo object?
> The code never gets to VSIWin32FilesystemHandler where recode to ucs2
> happens.
Very early in the GDALOpenInfo constructor a call is made to VSIStatExL()
which should go to VSIWin32FilesystemHandler::Stat() in cpl_vsil_win32.cpp.
I don't know why this would not happen.
Thereafter the file is opened with VSIFOpen() which is implemented
in cpl_vsisimple.cpp and on WIN32 uses _wfopen() on a wchar_t string.
I presume you are using a visual studio build, not some other windows
compiler - right?
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list