[Gdal-dev] Can't open a sid image under Russian locale

Peng Gao pgao at esri.com
Fri Feb 10 19:28:31 EST 2006


The path name passed into GDALOpen() is a multibyte string converted from
a Unicode string using Windows call wcstombs().

Gao, Peng

> -----Original Message-----
> From: Sean Forde [mailto:sforde at lizardtech.com] 
> Sent: Friday, February 10, 2006 4:13 PM
> To: Peng Gao; gdal-dev at lists.maptools.org
> Subject: RE: [Gdal-dev] Can't open a sid image under Russian locale
> 
> Peng,
> 
> I am not sure what the convention for the encoding of 
> GDALOpenInfo->pszFileName. The mrsid driver expects 
> poOpenInfo->pszFilename to be in OS-native encoding. If you 
> are passing in UTF8, then it will be garbled.
> 
> I am not sure if this is a bug in the driver (i.e. should we 
> be expecting poOpenInfo->pszFilename to be UTF8). If any one 
> has clues as to the conventions/requirments of 
> poOpenInfo->pszFilename, that would be helpful.
> 
> 	-Sean
> 
> 
> -----Original Message-----
> From: gdal-dev-bounces at lists.maptools.org 
> [mailto:gdal-dev-bounces at lists.maptools.org]On Behalf Of Peng Gao
> Sent: Thursday, February 09, 2006 3:25 PM
> To: gdal-dev at lists.maptools.org
> Subject: [Gdal-dev] Can't open a sid image under Russian locale
> 
> 
> GDAL can’t open a sid with a Russian path name. The problem 
> seems to be the name conversion in LTFileSpec. The following 
> is the name before and after.
>  
> I am using DSDK 5.0.6
>  
> /* 
> --------------------------------------------------------------
> ------ */
> /*      Create a corresponding GDALDataset.                   
>           */
> /* 
> --------------------------------------------------------------
> ------ */
>     MrSIDDataset        *poDS;
>     const LTFileSpec    oFileSpec( poOpenInfo->pszFilename );
>  
>  
> Before poOpenInfo->pszFilename:
>  
> “\\collingwood\checklist_data\Raster\I18N\Russian\фывdvim3_2.sid”
>  
> After oFileSpec.path8:
>  
>  "\\collingwood\checklist_data\Raster\I18N\Russian\Р‡в€љС‚dvim3_2.sid"
>  
>  
> 




More information about the Gdal-dev mailing list