View Full Version : Unicode filename support for DGIndexNV?
lansing
1st January 2021, 07:22
Any news on this?
stax76
1st January 2021, 18:11
Does it have a resource file embedded? You can check with Resource Hacker.
lansing
1st January 2021, 20:08
Does it have a resource file embedded? You can check with Resource Hacker.
I'm referring to the regular file name in windows. The program pretty much couldn't open any file with non-English filename/file path.
stax76
2nd January 2021, 04:26
I like the topic text encoding but since it's not open source and another reason... (not related to you) I think it's not the right thread for me.
I suggest using the support forum of the author:
http://rationalqm.us/board/index.php
LoRd_MuldeR
2nd January 2021, 21:57
Looking at a vanilla "DGIndex.exe", it seems like it contains an empty manifest.
You may wish to replace that with the following content, e.g. by using Resource Hacker (http://www.angusj.com/resourcehacker/), in order to enable UTF-8 support:
(requires Windows 10, Version 1903 or later!)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="avisynth.dgindex" version="1.0.0.0"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
</windowsSettings>
</application>
</assembly>
In my test this worked fine. Even though not all characters may display correctly in the GUI, the input file was opened and the output file was generated without problem:
https://i.imgur.com/n3DokZn.png
lansing
3rd January 2021, 01:32
Looking at a vanilla "DGIndex.exe", it seems like it contains an empty manifest.
You may wish to replace that with the following content, e.g. by using Resource Hacker (http://www.angusj.com/resourcehacker/), in order to enable UTF-8 support:
(requires Windows 10, Version 1903 or later!)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="avisynth.dgindex" version="1.0.0.0"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
</windowsSettings>
</application>
</assembly>
In my test this worked fine. Even though not all characters may display correctly in the GUI, the input file was opened and the output file was generated without problem:
https://i.imgur.com/n3DokZn.png
I tried it on my dgindex, it doesn't work with Japanese. It just crashed like before the modification.
おめでたい
LoRd_MuldeR
3rd January 2021, 02:00
Seems to work for me:
https://i.imgur.com/CKrFHaA.png
Sure the manifest was patched correctly? And you are on Windows 10 version 1903 (May 2019 Update) or later, right?
FWIW, here is "my" patched DGIndex binary:
https://easyupload.io/zp2sjx
lansing
3rd January 2021, 03:02
Seems to work for me:
https://i.imgur.com/CKrFHaA.png
Sure the manifest was patched correctly? And you are on Windows 10 version 1903 (May 2019 Update) or later, right?
FWIW, here is "my" patched DGIndex binary:
https://easyupload.io/zp2sjx
I am using Windows 10 version 2004. Your mod worked. How do you save it? I opened the exe -> edit the manifest -> compile script -> save.
LoRd_MuldeR
3rd January 2021, 03:35
I am using Windows 10 version 2004. Your mod worked. How do you save it? I opened the exe -> edit the manifest -> compile script -> save.
So did I ;)
(Be aware through, that if the EXE is located in "C:\Program Files" or "C:\Program Files (x86)", then Resource Hacker may not have write access, unless it was launched with "run as administrator" option)
lansing
3rd January 2021, 06:06
So did I ;)
(Be aware through, that if the EXE is located in "C:\Program Files" or "C:\Program Files (x86)", then Resource Hacker may not have write access, unless it was launched with "run as administrator" option)
Thanks I finally got mine working, don't know why it doesn't the first time. I copied the <application> tag into my manifest and dgindexNV also working now.
lansing
3rd January 2021, 09:26
I encountered another problem, seems like dgdecodenv.dll couldn't read unicode as well, DGSource couldn't read the unicode file path in my vapoursynth script, and then it couldn't read the file path in the dgi file also. Modifying the manifest for the dll didn't help.
stax76
3rd January 2021, 15:07
Only staxrip, x264 and mpv.net use a UTF-8 manifest, since a week. But you can enable UTF-8 support system wide in the administrative language settings of Windows 10 v1903.
LoRd_MuldeR
3rd January 2021, 16:27
I encountered another problem, seems like dgdecodenv.dll couldn't read unicode as well, DGSource couldn't read the unicode file path in my vapoursynth script, and then it couldn't read the file path in the dgi file also. Modifying the manifest for the dll didn't help.
Things like "long path" awareness and the ANSI codepage are per-process settings. You'd have to set that in the manifest of the "main" EXE file. TTBOMK, you cannot do it for individual DLLs.
BTW: Windows has been supporting the "Unicode" (UTF-16) API ever since Windows 2000. So any application/library written in the past ~20 years should actually be using the "Unicode" (UTF-16) API – instead of the old "ANSI" API – and thus should not need to be concerned with ANSI codepages at all. The whole idea of enforcing a certain codepage via manifest is just a workaround for "legacy" code. The "proper" fix is updating the code to the modern "Unicode" (UTF-16) API.
Emulgator
3rd January 2021, 16:53
Interesting, good to know.
videoh
7th January 2021, 22:53
Currently, Unicode is not supported, but you should be able to achieve the desired result by appropriately setting your system locale. If not, let me know. Probably something can be done about it.
lansing
8th January 2021, 07:14
Currently, Unicode is not supported, but you should be able to achieve the desired result by appropriately setting your system locale. If not, let me know. Probably something can be done about it.
Changing system locale is a Windows XP thing. DGIndexNV works now with manifest mod, it's just that it's doesn't work for DGDecodeNV.
videoh
8th January 2021, 11:25
Changing system locale is a Windows XP thing. No.
https://www.isunshare.com/windows-10/change-system-locale-in-windows-10.html
DGIndexNV works now with manifest mod, it's just that it's doesn't work for DGDecodeNV. Try the system locale.
lansing
8th January 2021, 18:34
No.
https://www.isunshare.com/windows-10/change-system-locale-in-windows-10.html
Try the system locale.
Nobody should be changing their system locale just to run a non unicode program because it's very annoying, it requires a system reboot every time you changed it while the keyboard were also changed. That's why there was AppLocale back in the XP days.
videoh
8th January 2021, 20:55
AppLocale still works for Win10:
https://github.com/xupefei/Locale-Emulator
Is that working for you?
lansing
8th January 2021, 21:57
AppLocale still works for Win10:
https://github.com/xupefei/Locale-Emulator
Is that working for you?
This one only supports 32 bit program, all my programs are 64 bit.
videoh
9th January 2021, 00:28
Why do you need to keep changing the system locale?
lansing
9th January 2021, 07:38
Why do you need to keep changing the system locale?
Change of system locale will also effect the keys on the keyboard, for example, changing to Japanese locale will have the forward slash changed to another sign that's local to Japan.
videoh
9th January 2021, 12:33
Life is full of disappointments.
stax76
9th January 2021, 16:38
@lansing
Code page can be changed to UTF-8 permanently! Many of us have done this without experiencing problems!
https://i.postimg.cc/02krkrNT/Untitled.png
videoh
9th January 2021, 17:22
Interesting, thank you. I'll try it out.
@lansing
The keyboard map can be independently modified.
lansing
9th January 2021, 18:00
@lansing
Code page can be changed to UTF-8 permanently! Many of us have done this without experiencing problems!
Thanks I just tried it and it worked. I googled it earlier and read that it may cause problem for some fonts. I will keep it active for now until problem arises.
videoh
9th January 2021, 19:00
Great to hear, lansing. Please keep us informed. Wasn't looking forward to convert DG apps to UTF-16. :sly:
This seems to be the way to go:
http://utf8everywhere.org/
Probably should set UTF-8 as default for the EXE and DLL via the manifest/resources.
EDIT: Added UTF-8 to both DGIndexNV and DGDecodeNV manifests. Will include in next slipstream. That should remove the need to force UTF-8 at the OS level with the "Beta: ..." option.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.