XnView and DOS 8.3 names
Posted: Sat Aug 22, 2015 1:51 am
I know XnView classic does not support Unicode in filenames (or at least doesn't support characters from foreign locales) and I'm not going to demand it. I know as well XnViewMP can do that, but my need for viewing such files is very rare and often they just can be renamed for doing this in classic version. The following is not direct suggestion, but rather a curiosity.
I just want to ask if XnView classic could potentially make some more use of one trick than it does now.
Preparations:
- any graphic file XnView can open;
- access to Unicode font which not belongs to your locale;
- Windows console cmd.exe.
I took from wiki page for Norwegian alphabet letter "ø" and renamed one .bmp file on disk L:\ to "ø.bmp". As expected, XnView reported an error on attempt of opening it.
Next I have opened cmd on L:\ and issued command "dir /x *.bmp". That gave me short DOS-alike name in 8.3 format for this file.
In my case it was "24FD~1.BMP", though files with the same name and different extensions get different name part.
Then I have started XnView, menu File->Open, typed full path in DOS-style "L:\24FD~1.BMP" in filename field, clicked Open and landed in HEX viewer mode. Why XnView ever has it, you can't edit file and font is too small. But contents of file were correct.
If you do the same with file which does not contain foreign characters in its name (i.e. convert to DOS 8.3 and feed this way to XnView), then XnView opens it in Viewer mode.
So, can anything be done to have something more from ability to read Unicode named files with HEX viewer?
Like button "show as image" in HEX Viewer, or "Copy to temporary memory block and open", or hardcore "DOS 8.3" mode for XnView Browser, or menu "File->Open using DOS names"?
This method works with XVI32 HEX Editor. It can not open Unicode named files, but can access them and correctly save changes if path is given in DOS-style. Of course, XnView is more complicated software.
P.S. With HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation not set to 0 in registry all this idea goes kaput.
I just want to ask if XnView classic could potentially make some more use of one trick than it does now.
Preparations:
- any graphic file XnView can open;
- access to Unicode font which not belongs to your locale;
- Windows console cmd.exe.
I took from wiki page for Norwegian alphabet letter "ø" and renamed one .bmp file on disk L:\ to "ø.bmp". As expected, XnView reported an error on attempt of opening it.
Next I have opened cmd on L:\ and issued command "dir /x *.bmp". That gave me short DOS-alike name in 8.3 format for this file.
In my case it was "24FD~1.BMP", though files with the same name and different extensions get different name part.
Then I have started XnView, menu File->Open, typed full path in DOS-style "L:\24FD~1.BMP" in filename field, clicked Open and landed in HEX viewer mode. Why XnView ever has it, you can't edit file and font is too small. But contents of file were correct.
If you do the same with file which does not contain foreign characters in its name (i.e. convert to DOS 8.3 and feed this way to XnView), then XnView opens it in Viewer mode.
So, can anything be done to have something more from ability to read Unicode named files with HEX viewer?
Like button "show as image" in HEX Viewer, or "Copy to temporary memory block and open", or hardcore "DOS 8.3" mode for XnView Browser, or menu "File->Open using DOS names"?
This method works with XVI32 HEX Editor. It can not open Unicode named files, but can access them and correctly save changes if path is given in DOS-style. Of course, XnView is more complicated software.
P.S. With HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation not set to 0 in registry all this idea goes kaput.