Hi all,
Still remain a problem :
I use osgDB::ifstream to load a file.
* osgDB::ifstream in( filename.c_str() );
if(osgDB::fileExists(filename))
cout << "Config File constructor : file exist ! " << std::endl;
if( in.bad() ) throw file_not_found( filename ); *
There is no error, but when the loop read the file, eof is found and cothing
in read from the file...
PS : I complil osg with the OSG_USE_UTF8_FILENAME.
PS2 : the file name contains accent and space, I get it in a char* converted
to string.
Any idea ? I'm looking for hours without results...
Thanks.
Regards,
Vincent.
2009/7/1 Vincent Bourdier <[email protected]>
> I did'nt ...
>
> I'll try that.
>
> I assume that using the osgDB::ifstream instead of std::iftream is
> necessary too.
> Thanks for the tip, I'll dig into the issue to see if this will solve my
> problem.
>
> Regards,
> Vincent.
>
> 2009/7/1 Ulrich Hertlein <[email protected]>
>
>> On 1/7/09 11:38 AM, Vincent Bourdier wrote:
>>
>> My file main.cpp where the string is put is encoded in UTF8 without BOM.
>>>
>>> / string path2 = "Z:/release with space et é où è
>>> )/Data/3d/data/font/arial.ttf";
>>>
>>> if(osgDB::fileExists(path2))
>>> cout << "PATH2 exist ! : " << path << std::endl;
>>> else
>>> cout << "PATH2 NOT exist ! : " << path << std::endl;/
>>>
>>> This is not working, but when it will works, I will use a char* instead
>>> of path2 ... does it sounds possible ?
>>>
>>
>> I believe OSG_USE_UTF8_FILENAME is off by default, did you set it in your
>> build?
>>
>> /ulrich
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org