Hi,
looks like in gflib and xnview char* filenames were used in place of tchar so people which uses unicode characters like in japan or china can't view their images...
am I wrong?
Best regards
Unicode names
Moderators: helmut, XnTriq, xnview
Re: Unicode names
Yes, i use char* but you can convert UNICODE to multibyteAlessandro wrote:Hi,
looks like in gflib and xnview char* filenames were used in place of tchar so people which uses unicode characters like in japan or china can't view their images...
am I wrong?
Pierre.
Re: Unicode names
You can't actually.xnview wrote:Yes, i use char* but you can convert UNICODE to multibyte
Works if the filename only contains char representable by the system locale.
But won't work with "real" WideChar filenames.
E.g. I won't be able to open files with arab chars in the name under my de-DE Windows

Workaround is to use gflLoad*FromHandle + Callbacks + CreateFileW (under Windows)
There should be a "Windows only" set of wchar_t* enabled functions.
(*nix doesn't really support WideChar filenames FWIK, instead it will use UTF-8 encoded char*, if at all...)
actually I think I can also use _wfopen for this purpose, tough I couldn't get a valid FILE * value yet.
Except this I also wonder what the result values should be... GFL_ERROR & GFL_NO_ERROR in read and seek callbacks, and the position in tell? and are those 3 function enough to make gfllib work only to read files or should I define a wrapper for write too?
how bothersome...
Except this I also wonder what the result values should be... GFL_ERROR & GFL_NO_ERROR in read and seek callbacks, and the position in tell? and are those 3 function enough to make gfllib work only to read files or should I define a wrapper for write too?
how bothersome...

I have a small unicode layer built into gflW, the C++ Wrapper, that demonstrates the use of callbacks.
It's not really good, but it does it job.
Maybe you can get some ideas from it
http://celebnamer.celebworld.ws/stuff/libgflW/
It's not really good, but it does it job.
Maybe you can get some ideas from it

http://celebnamer.celebworld.ws/stuff/libgflW/