Caption conversion when creating file

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Locked
Squarefox
Competition winner
Posts: 117
Joined: Tue Aug 19, 2008 6:46 pm
Location: Delta quadrant, Borg nexus 0001
Contact:

Caption conversion when creating file

Post by Squarefox »

Hi,

when I'm creating a new file with Irrlichts file system, it converts all capital letters from the filename to small letters.
How can I avoid this?

Regards,
Squarefox
CuteAlien
Admin
Posts: 9846
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Caption conversion when creating file

Post by CuteAlien »

Ah, I had hoped we fixed those kind of conversions long ago :-( Only one I still knew was in the file-open dialog (on my todo already).
Will have to investigate - which of the functions were you using exactly?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Squarefox
Competition winner
Posts: 117
Joined: Tue Aug 19, 2008 6:46 pm
Location: Delta quadrant, Borg nexus 0001
Contact:

Re: Caption conversion when creating file

Post by Squarefox »

Hi,

I checked it once more: the problem is not creating the file (it's correct with capital letters).
IFileSystem::createFileList returns small letter filenames only.

The problem is in CFileSystem::createFileList when CFile is create with CFileList(Path, true, false).
The true specifies IgnoreCase.
So the filename is converted to lower caps.

The fix is simple: just change the true to false. I just tested it.
Should also give lesser problems under Linux, when the caps is important.

This also fixes the file list in the FileOpenDialog (tested also).

Regards,
Squarefox
CuteAlien
Admin
Posts: 9846
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Caption conversion when creating file

Post by CuteAlien »

Hm, discussion now split into 2 threads. I'm closing this one - thread continues there: http://irrlicht.sourceforge.net/forum/v ... =7&t=50768
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Locked