loader.loadModel and unicode

I’ve a little problem with unicode file/directories. It doesn’t seem to work for loader.loadModel().

For exemple, if I load c:\test\test.egg with :
loader.loadModel("/c/test/test.egg") it works well

But, if I try to load c:\testé\test.egg, it says :
loader error, couldn’t load file /c/testé/test.egg doesn’t exist

Is there a trick to make it works, cause I can’t control in which directory the user will install my program.


it seems that this problem is only on windows :imp:

Use relative paths since you can’t control the absolute path anyway.


The problem is, Panda is asking for a full path. I can’t use loader.loadModel with a relative path. He is only looking in model path.

Panda takes paths relative to the current working directory.
So if relative paths don’t work for you, make sure your current working directory is in the directory where your application resides.

Weird, it doesn’t works with me. Here is my folder tree:

|-app (main is here)
   |- gui (code who load the model is here)
   |- resources (my models are here)

I tried
maps = loader.loadModel("/…/resources/gui/buttons/button_new.egg")
maps = loader.loadModel("/resources/gui/buttons/button_new.egg")
and neither of these work.
But if I add “/c/app/” at the beginning, it works well (if there is no unicode character)

Do not add the slash at the start. Like this:

maps = loader.loadModel("resources/gui/buttons/button_new.egg") 

Yeah it works. Thanks.

I think it’ll help me to solve a part of my problem, but this unicode problem still remain if the user wants to add a mesh with a unicode character (yes, the user can add his own meshes)

if user can add own meshes. just write a guide to it. if he’s able to add them from within the engine… well. just prohibit unicode/stuff the name in tags and name the models with numbers… there are manyoptions. but i think telling the user that unicode characters are not allowed would be the easiest. i’d say this restriction is not that much of a loss