Topic: Compdir.vdm problem (1 of 7), Read 26 times, 1 File Attachment
Conf: Wildfile, Other macros
From: Pauli Lindgren
Date: Thursday, September 17, 2009 12:28 PM

I haven't used compdir.vdm for long time.
I recall it did work earlier (perhaps in Windows-98), but now when I tried it on Windows XP, it did not work at all.
It gave an error message "Can't find |!|W", and everything was messed.

After studying the problem for a while, I found out that the problem is the thousands separator in file size.
For some reason, it is character '' (hex ff).
On the DOS window, the separator is space, as it should be. And if I copy-paste the DIR listing from DOS window to Vedit, the separator is space. But if I execute
dir > dir.tmp
and then open the file dir.tmp in Vedit, it has '' as thousands separator.

I noticed that in Terminal font, this character is displayed as space. Maybe that is the font used in DOS box and Windows converts the characters when copying.

I wonder if anybody else has noticed this problem?

Anyway, I fixed it by adding one line in compdir.vdm to delete these characters. The modified macro is attached.

Maybe it would be possible to use dir_date() instead of calling DOS.
Looks like dir_date() does support the -s option (even if it is not documented), but it does not quite work. The directory names are all displayed as "\\\\\\". Maybe this could be fixed?

--
Pauli

 
COMPDIR.VDM (29KB)

 


Topic: Compdir.vdm problem (2 of 7), Read 19 times
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Thursday, September 17, 2009 05:52 PM

On 9/17/2009 12:28:32 PM, Pauli Lindgren wrote:

>I haven't used compdir.vdm for long time.
>I recall it did work earlier (perhaps in Windows-98), but
>now when I tried it on Windows XP, it did not work at all.

I'm using it in XP (but not often). It's working here.

>After studying the problem for a while, I found out that
>the problem is the thousands separator in file size.
>For some reason, it is character '' (hex ff).
>On the DOS window, the separator is space, as it
>should be.

Space as thousands separator? I've never heard about that.


>Anyway, I fixed it by adding one line in compdir.vdm to
>delete these characters.

Delete?
Wouldn't it be better to replace by another character?
(I haven't checked COMPDIR.VDM in detail now.)


BTW: in 2006 I published a patch for COMPDIR.VDM fixing a problem with long pathnames:
http://webboard.vedit.com/read?22601,41

The 2006's macro is available here:
http://www.ziemski.net/vedit/macros/compdir.vdm


Christian

 


Topic: Compdir.vdm problem (3 of 7), Read 19 times
Conf: Wildfile, Other macros
From: Pauli Lindgren
Date: Saturday, September 19, 2009 10:38 AM

On 9/17/2009 5:52:59 PM, Christian Ziemski wrote:
>
> Space as thousands separator? I've never
> heard about that.

Space is used as thousands separator for example in Finland, Sweden, Norway, France, Canada (French), Estonia, Hungary, Poland and Russia.

There are other separator used, too. For example in Switzerland they use single quote ('). Maybe that should be handled, too.

You can check the different formats used in different regions for example from Windows Control Panel, at Regional and Language Options.

>
>> Anyway, I fixed it by adding one line in compdir.vdm to
>> delete these characters.
>
> Delete?
> Wouldn't it be better to replace by
> another character?

Compdir.vdm removes the thousands separator in any case (maybe because it needs to convert the file size into numeric value).
But perhaps it would be more logical to convert the separator first into '.', so that the format would be same as for example in Germany.
I tried this, and both methods work equally well.

>
> BTW: in 2006 I published a patch for
> COMPDIR.VDM fixing a problem with long
> pathnames:
> http://webboard.vedit.com/read?22601,41
>
> The 2006's macro is available here:
> http://www.ziemski.net/vedit/macros/comp
> dir.vdm

Yeah, I noticed that problem soon after fixing the thousands separator. The command line becomes too long quite easily, since there are two pathnames given in the command.

--
Pauli

 


Topic: Re: Compdir.vdm problem (4 of 7), Read 16 times
Conf: Wildfile, Other macros
From: Ted Green
Date: Monday, September 21, 2009 10:57 AM


>From: "Christian Ziemski" (czml1@...) On 9/17/2009
12:28:32 PM, Pauli Lindgren wrote:
>
>>After studying the problem for a while, I found out that
>>the problem is the thousands separator in file size.
>>For some reason, it is character '' (hex ff).
>>On the DOS window, the separator is space, as it
>>should be.
>
>Space as thousands separator? I've never heard about that.

Since this appears to be a language-related problem and it is Christian's
macro, I hope you two can resolve it and provide me with the fix.

Ted.

 


Topic: Re: Compdir.vdm problem (5 of 7), Read 16 times
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Wednesday, September 23, 2009 03:26 PM

On 21.09.2009 17:00 in vtech-macros Ted Green wrote:
>
>[thousands separator]
>
> Since this appears to be a language-related problem and
> it is Christian's macro, I hope you two can resolve it
> and provide me with the fix.

I'll have a look soon.

Christian

 


Topic: Re: Compdir.vdm problem (6 of 7), Read 16 times, 1 File Attachment
Conf: Wildfile, Other macros
From: Pauli Lindgren
Date: Sunday, September 27, 2009 03:48 PM

I made a new implementation on top of Christians version.

This time, I just added the new separators ( and ') in the commands that search / delete the separators (on two lines).

In addition, I changed the REGEXP syntax to follow the new syntax ("()" instead of "{}").

I tested this version by selecting the language "German (Switzerland)" in the Regional and Language Options on Control Panel. It seems to work OK. (The old version crashes with error message.)

There are several other improvements I have been planning to do to this macro, but let's wait until the next version of Vedit has been released.

--
Pauli

 
COMPDIR_PL2.VDM (30KB)

 


Topic: Re: Compdir.vdm problem (7 of 7), Read 12 times
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Wednesday, September 30, 2009 05:50 AM

On 9/27/2009 3:48:03 PM, Pauli Lindgren wrote:
>I made a new implementation on top of Christians version.
>
>This time, I just added the new separators ( and ') in
>the commands that search / delete the separators (on two
>lines).
>
>In addition, I changed the REGEXP syntax to follow the
>new syntax ("()" instead of "{}").


Thank you for the fixes, Pauli.
It is (still) working fine here on my German Windows.


>There are several other improvements I have been
>planning to do to this macro,but let's wait until the next
>version of Vedit has been released.

Please note: The macro is written for US and German (partly European) Windows configuration and specially for German/English language while scanning the data.

If you/we really will work on the macro sometime we should consider improvements there as well.

But in fact:
Nowadays I'm using the macro rarely (if at all) since I switched to Linux for most of my tasks.
For file comparison I'm using KDiff3 now.
(http://kdiff3.sourceforge.net)


Christian