6:修改读取S57海图数据中文属性值乱码
e:\3rdPart\gdal-1.9.2\ogr\ogrsf_frmts\s57\s57reader.cpp line 883
// Add By liml 2013-04-25 Convert UCS-2 to Utf-8
const char* pachBuffer = poRecord->GetStringSubfield("NATF",0,"ATVL",iAttr);
if( EQUAL(pszAcronym, "NOBJNM"))
{
size_t nLength = strlen(pachBuffer);
char* pszValue = new char[nLength];
memcpy(pszValue, pachBuffer, nLength);
pszValue[nLength-1] = '\0';
char *pszGetUTF8 = CPLRecodeFromWChar( (const wchar_t*)pszValue, CPL_ENC_UCS2, CPL_ENC_UTF8);
pachBuffer = CPLRecode( pszGetUTF8, CPL_ENC_UTF8, CPL_ENC_LOCALE);
delete []pszValue;
}
// Add By liml 2013-04-25
poFeature->SetField( pszAcronym, pachBuffer);
1