FileSystem with wchar_t, how hard?

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!
Post Reply
Nyxojaele
Posts: 98
Joined: Mon Sep 18, 2006 4:06 am

FileSystem with wchar_t, how hard?

Post by Nyxojaele »

How hard would it be to convert the CFileSystem class to use wchar_t for directory structures and whatnot? Is it just a matter of changing all the const c8 * to const wchar_t *, stringc to stringw, and all the OS specific functions to call wide character equivalents, or is there something more that I'm not seeing?

The reason I ask is because I develop for Japanese systems, and there is quite often directories named in Japanese, and obviously, using only regular char's is insufficient for that- so for example, using the default IGUIFileOpenDialog, navigating to a Japanese directory will display it just as "????????????", and for the same reason it displays it that way, you cannot navigate INTO the directory either.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

I guess the best way to find out would be for someone who wants this done to do it themselves.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There are no file system calls etc. which do provide the proper interface that I know of. Do you have a link to such methods?
Nyxojaele
Posts: 98
Joined: Mon Sep 18, 2006 4:06 am

Post by Nyxojaele »

Well if you're talking about all the function calls such as
fopen() http://msdn.microsoft.com/en-us/library ... S.80).aspx
_getcwd() http://msdn.microsoft.com/en-US/library ... S.80).aspx
_chdir() http://msdn.microsoft.com/en-US/library ... S.80).aspx
then yes, there are widecharacter versions of them (at least, according to the MSDN links I just provided).. But I know nothing of the *nix equivalents, since I know you're more well-acquainted with it.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

That's interesting, we'll keep those in mind for the new file system implementation.
Post Reply