Log in

View Full Version : vdubmod charset encoding in vcf scripts


len0x
11th July 2003, 16:50
I've come across very interesting problem. When you need to pass a path which contains local charset (non-english) characters for such functions as SaveAVI, OpenAVI you seem to have to convert those to the form in hex format like this: 0x__. Works fine.

But when it comes to new finctions like stream[].SetSource it doesn't accept that! I've tried saving configuration and see how VDuBMod handles it internally. Result was - it represents every local character by 2 bytes! I've tried UTF8 encoding, but didn't succeed. So how can I get VDubMod compliant strings?
(I'm sure if I spent lots of hours looking at the code for VDubMod I could have found that, but my guess the developers should now that straight away)

Suiryc
15th July 2003, 16:48
Hi

IIRC the name is first translated to UTF8 and then processed by the VirtualDub function that replaces some chars by their hex value (\0x__).

len0x
15th July 2003, 16:56
Are you talking about OpenAVI function or SetSource ?
Because it seems to me that they behave completely different...

len0x
15th July 2003, 19:40
I'm starting to think that it's a bug in VDub(Mob) for SetSource function, since the UTF8 representation of the same string I'm doing manually is completely different from what VDubMod saves into vcf script.

It's really hard to detect this since the same routine is applied internally to decode the string, so everything is just fine for VDubMod but it's not compliant with UTF8 hex representation. It's kinda maked it impossible to write scripts with local characters in it at the moment :)

Suiryc
15th July 2003, 20:08
The functions that uses UTF8 strings are for SetSource functions (OpenAVI hasn't been changed for a lot of reasons).

Well Avery's Unicode<->UTF8 conversion routines seem to work since the UTF8 strings made works when embedding UTF8 subs in mkv files and then displaying them with VSFilter.

By the way I just recalled but the little doc decribing the functions available in Sylia scripts tells when strings are UTF8 or not.

len0x
17th July 2003, 16:54
It turned out that if I do Ansi -> Unicode conversion first, and then Unicode -> UTF8 then I get VDubMod compliant string. If I do direct Ansi -> UTF8, then I get incompatible strings (at least in Delphi). Very wierd.