[gdal-dev] UTF8/Wide chars in path

Frank Warmerdam warmerdam at pobox.com
Fri Jan 15 22:49:39 EST 2010


ogr user wrote:
> Dear all,
> 
>  I've been looking around GDAL codebase and I can't see anything that
> would deal with wide/multybyte characters for file names/paths on
> Windows. Would you please confirm that on Windows GDAL will only be able
> to open files with pure ASCII names, not international charset?

Mr. Xonx,

You are correct - there is no special handling for multibyte characters.
On some operating systems the underlying file open functions support
UTF-8 filenames, but I believe this is not the case for windows where
we mostly use CreateFile() in the non-wide character form.

I had hoped to hack something in to address this for 1.7.0 but I never
got to it.  It hasn't been a priority for any of my clients so far.

On the good side, an adjustment in gdal/port/cpl_vsil_win32.cpp could
fairly easily enable support for UTF-8 filenames for most drivers.

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