[osg-users] Problem with loading 3d-models with asian characters in file name.

2012-08-20 Thread Carsten Scharfe
Hi,

I hope somebody can help me out with this nasty problem.

I try to load model file (e.g. a collada file) which has some asian characters 
in its file name.
Although I’ve compiled Osg with OSG_USE_UFT8_FILENAME set to true, no model is 
loaded.
osgDB::readNodeFile just returns an empty node as result, saying that the file 
was not found.

A filename like E:\3dlibnew\$龙\龙.dae is received as E:\3dlibnew\$?\?.dae even 
in our
own application.

Do I need to do additional conversions?
Please help me. Any advice is welcome.

I’m using Osg 3.0 on Win7.

Regards,
Carsten


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with loading 3d-models with asian characters in file name.

2012-08-20 Thread Wang Rui
Hi Carsten,

The OSG_USE_UFT8_FILENAME option actually doesn't work with Asian directory
names, unless your source files are also UTF8. Sometimes I use the
setlocale() function at the beginning of an application to choose current
machine's locale, like the following:

std::locale::global( std::locale(, std::locale::all ^
std::locale::numeric) );

Or directly select the Simplified Chinese locale:

setlocale( LC_ALL, .936 );

Hope it helps. BTW, I found the latest OSG works well with Chinese
directories and filenames. Maybe you could give it a try again.

Wang Rui


2012/8/20 Carsten Scharfe cscha...@dspace.de

  Hi,

 I hope somebody can help me out with this nasty problem.

 I try to load model file (e.g. a collada file) which has some asian
 characters in its file name.
 Although I’ve compiled Osg with OSG_USE_UFT8_FILENAME set to true, no
 model is loaded.
 osgDB::readNodeFile just returns an empty node as result, saying that the
 file was not found.

 A filename like E:\3dlibnew\$龙\龙.dae is received as E:\3dlibnew\$?\?.dae
 even in our
 own application.

 Do I need to do additional conversions?
 Please help me. Any advice is welcome.

 I’m using Osg 3.0 on Win7.

 Regards,
 Carsten



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with loading 3d-models with asian characters in file name.

2012-08-20 Thread Sergey Polischuk
Hi just guessing: may be it have something to do with current std::locale set? Cheers. 20.08.2012, 16:23, "Carsten Scharfe" cscha...@dspace.de:Hi, I hope somebody can help me out with this nasty problem. I try to load model file (e.g. a collada file) which has some asian characters in its file name.Although I’ve compiled Osg with OSG_USE_UFT8_FILENAME set to true, no model is loaded.osgDB::readNodeFile just returns an empty node as result, saying that the file was not found. A filename like E:\3dlibnew\$龙\龙.dae is received as E:\3dlibnew\$?\?.dae even in ourown application. Do I need to do additional conversions?Please help me. Any advice is welcome. I’m using Osg 3.0 on Win7. Regards,Carsten  ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org