Hello,
XnView is now ignoring all files and directories whose names have unicode characters, e.g. 你好世界. Please add support for unicode filenames.
There're two problems in windows with unicode filenames. The first one is that the regular c functions, e.g. open() stat(), do not work if the filename has unicode characters, e.g. 你好世界. We need to use the wide character functions instead, e.g. _wopen(), _wstat().
In mingw (or similarly in MSVC), a header file, tchar.h, exists to make it easier to work in both unicode & non-unicode systems. basically tchar.h has something like:
#ifdef _UNICODE
typedef wchar_t TCHAR;
#define _topen _wopen
#define _tstat _wstat
#else
typedef char TCHAR;
#define _topen open
#define _tstat _stat
#endif
So, if we use TCHAR instead of char, and _topen() instead of open(), it'll get mapped correctly depending on whether _UNICODE is defined. Note that some microsoft functions check for UNICODE not _UNICODE, so we'll need to define both. For more information about this, please see http://sourceforge.net/mailarchive/mess ... .yahoo.com particularly the replies from Tor Lillqvist.
The second problem is that the command line arguments in main() (*argv[]) would get encoded incorrectly if unicode arguments are used. We can use __wgetmainargs() to get the wide character arguments instead.
Once we have the wide character strings, we convert them to utf-8 so we can pass them around in functions which expect char *; and we convert them back to wide char strings just before calling the _wopen(). For more information, please see http://sourceforge.net/mailarchive/mess ... .yahoo.com
tuit
please add support for unicode filenames
Moderators: XnTriq, helmut, xnview
Re: please add support for unicode filenames
After 4 years, this request has still not been fulfilled. XnView is very limited to western languages only. No support for Eastern languages?
I'm using English version of windows 7 64 bit, but can't open files which have unicode characters in it's path.
I'm using English version of windows 7 64 bit, but can't open files which have unicode characters in it's path.
Re: please add support for unicode filenames
Thanks. I'll try it.
Re: please add support for unicode filenames
And it has 1/100 of XnView features...tough choice.xnview wrote:XnViewMP has native UNICODE support...
Re: please add support for unicode filenames
No almost 50%, new version will be available soon...V@no wrote:And it has 1/100 of XnView features...tough choice.xnview wrote:XnViewMP has native UNICODE support...
Pierre.
Re: please add support for unicode filenames
if so, can u open this files?
- Attachments
-
- CanUOpenThis¿.zip
- Download, Extract n open with Xnview...
- (157.16 KiB) Downloaded 99 times
Re: please add support for unicode filenames
With XnViewMP?d03g03l wrote:if so, can u open this files?
Pierre.