Issue with path

Support forum for DGDecNV
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Issue with path

Post by Rocky »

Yes sir, big t.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Issue with path

Post by Curly »

Be careful Rocky. Don't push too hard. You don't know who you are dealing with.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Issue with path

Post by Rocky »

Don't worry. We go way back.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Issue with path

Post by Guest 2 »

Rocky wrote:
Tue Oct 04, 2022 4:08 pm
Don't worry. We go way back.
Ok, now I understand what happened.

I did a clean installation of DGDecNV and I forgot to use the correct manifest. :oops:
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Issue with path

Post by Rocky »

Thank you for the follow-up. Curly heaved a sigh of relief. :D

Maybe we should make the UTF-8 manifest the default? :scratch:
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Issue with path

Post by Guest 2 »

Rocky wrote:
Wed Oct 05, 2022 12:46 pm
Maybe we should make the UTF-8 manifest the default? :scratch:
I think only a few people have Unicode support enabled in Windows. Or not?
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Issue with path

Post by Rocky »

Make it the default only for smart people.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Issue with path

Post by Curly »

Me too.
User avatar
Wonder Woman
Posts: 58
Joined: Sun Feb 07, 2021 10:46 am

Issue with path

Post by Wonder Woman »

I don't need any support anywhere, you can see. ;) :oops: ;)
User avatar
new_guy
Posts: 59
Joined: Fri Jan 15, 2021 11:12 am

Issue with path

Post by new_guy »

Image
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Issue with path

Post by Rocky »

Nice doggie. Stay there.

The method being used by ffms2/directshowsource et al is to use wide characters internally in the code. Then use conversion routines to convert the incoming encoding to wide character, e.g., MultiByteToWideChar(). pinterf just modified DirectShowSource() to take a parameter utf8 to signal use of these routines. So before invoking your application you need to know and tell what your encoding is. I believe ffms2 may try to determine that automatically but I haven't checked the code. I doubt there is a way to reliably do that. You can't expect a BOM because often it is not used and as you'll see in the article linked below, BOMs are not a good idea. Anyway, for pinterf's stuff the app must be notified, i.e., there is an effective configuration of whether to use UTF8 or not. When not, the system locale codepage is used. The same is true for DGDecNV. You configure UTF8 or not by which manifest you enable. Typically people are not switching modes every 5 minutes. They run in one mode on their system. The manifest method is very clean and simple and does not require internal wide character to be implemented. DGDecNV then uses UTF8 internally and doesn't require all the fraught conversion routines with their corner cases and error exceptions, etc. To do a MultiByteToWideChar() conversion safely you have to call it twice, once to get the needed buffer size and again to do the conversion. And you have to look after allocating/freeing memory and making sure the strings are correctly terminated. This internal wide character solution is nutso, while running UTF8 internally is so easy. I've posted this before but here it is again, a concise case for internal UTF8.

https://utf8everywhere.org/

The section on how to do unicode text on windows (Section 10) is now obsolete as it is no longer true that "The problem with Windows platform is that it does not (yet) support Unicode-compatible narrow string system APIs." Windows supports UTF8 directly now, either through the infamous "beta" setting or through a manifest.

See here for an example of the muck you get involved with when trying to use the internal wide character approach. Just what we need in our applications. Not!

https://ravenspoint.wordpress.com/2010/ ... haracters/

Initially, the author couldn't even get it right, and had to be corrected by the commenters. And the author acknowledges that it is windows-specific. Crazy.

One thing that could be considered for DGDecNV, if frequent changes are needed, is to provide a little quick manifest switcher utility. Want UTF, run 'setutf8'. Want system locale, run 'setsl'. Nobody has ever asked for such a thing or complained that switching is currently too hard, but Sherman said he'd make that utility if we want. Go for it, Sherm!
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Issue with path

Post by Sherman »

Rocky wrote:
Sun Dec 03, 2023 5:54 am
Go for it, Sherm!
It's to help stupid people, right?
Sherman Peabody
Director of Linux Development
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Issue with path

Post by Curly »

u cud get a+
Curly Howard
Director of EAC3TO Development
User avatar
Albert
Posts: 40
Joined: Thu Oct 15, 2020 1:20 pm

Issue with path

Post by Albert »

All reference frames are valid.
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

Issue with path

Post by Bullwinkle »

All is calm, all is bright.
Post Reply