It looks correct to me. My understanding is: The Collada DOM uses UTF-8 and assumes that all strings passed to it will be UTF-8.
- In the first case (OSG_USE_UTF8_FILENAME is defined) the filename is already UTF-8, so it can be converted straight to a URI. - In the second case (OSG_USE_UTF8_FILENAME not defined) the filename is using the current code page so must first be converted to UTF-8, then converted to a URI. My only suggestion is that this check should be moved into ConvertFilePathToColladaCompatibleURI itself. HTH On 21 January 2011 11:56, Robert Osfield <[email protected]> wrote: > Hi Sukender, > > I have now merged the changes to osgDB with reservations - as we can > come back and fix the case issue later. > > I am currently review the changes to the dae plugin, and have come > across an #ifdef OSG_USE_UTF8_FILENAME block in daeWMaterials.cpp. Is > this block supposed to be there? The #if #else #endif also looks the > wrong way around to me, with the convert to UTF8 in the #else block. > The code is: > > #ifdef OSG_USE_UTF8_FILENAME > fileURI = > ReaderWriterDAE::ConvertFilePathToColladaCompatibleURI(fileURI); > #else > fileURI = > ReaderWriterDAE::ConvertFilePathToColladaCompatibleURI( > osgDB::convertStringFromCurrentCodePageToUTF8(fileURI) ); > #endif > > What is your intention here? > Robert. > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
