I really love this plugin but it appears as though the DeleteToTag function is not working properly for me. With offset set to 0, only the first letter of a tag is getting deleted and not the entire tag. The DeleteFromTag works as stated, offset=0, entire tag to end of line gets deleted. Below are a couple of examples;
Before running DeleteToTag script
[c:\Documents and Settings\sg0426477\My Documents\My Stuff\WA\Workstation\TACTICAL\Reports\Daily\AARP Site Health Dashboard\status.txt]
After running DeleteToTag("Daily\\",0)
aily\AARP Site Health Dashboard\status.txt]
Before running DeleteFromTag script:
[c:\Documents and Settings\sg0426477\My Documents\My Stuff\WA\Workstation\TACTICAL\Reports\Daily\HCX Dashboard\status.txt]
After Running DeleteFromTag("Daily\\",0)
[c:\Documents and Settings\sg0426477\My Documents\My Stuff\WA\Workstation\TACTICAL\Reports\
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
>With offset set to 0, only the first letter of a tag is getting deleted and not the entire tag
Yep. That's a bug. It's supposed to be deleting the entire tag, not just the first letter. DeleteFromTag seems to work fine. It's just the DeleteToTag that's having problems. I'll fix it. In the mean time, the above suggestion of using an offset should at least give you a workaround.
>the file was cut right at the position of the first NUL character that should have been kept
Sounds like a problem in Delphi's handling of strings with NULs in them. I'll see if I can find some way of writing around it.
I'm still planning on a new release with Unicode support and variables, but both are giving me no end to problems and headaches. In the mean time, I can at least fix these known bugs. I won't have any time to work on it this weekend, but I should have a new release early next week some time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just tried DeleteFromTag in a file containing NUL characters on the first line. The result was that the file was cut right at the position of the first NUL character that should have been kept. I guess this is because of a copying function stopping at the first NUL character. Please fix this!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try using an offset of the length of the tag minus 1. This should work for DeleteToTag.
This should also be fixed, because now there is a "logical" shift in the offset.
Also, the help texts accompanying these functions seem to refer to examples that are not part of these texts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really love this plugin but it appears as though the DeleteToTag function is not working properly for me. With offset set to 0, only the first letter of a tag is getting deleted and not the entire tag. The DeleteFromTag works as stated, offset=0, entire tag to end of line gets deleted. Below are a couple of examples;
Before running DeleteToTag script
[c:\Documents and Settings\sg0426477\My Documents\My Stuff\WA\Workstation\TACTICAL\Reports\Daily\AARP Site Health Dashboard\status.txt]
After running DeleteToTag("Daily\\",0)
aily\AARP Site Health Dashboard\status.txt]
Before running DeleteFromTag script:
[c:\Documents and Settings\sg0426477\My Documents\My Stuff\WA\Workstation\TACTICAL\Reports\Daily\HCX Dashboard\status.txt]
After Running DeleteFromTag("Daily\\",0)
[c:\Documents and Settings\sg0426477\My Documents\My Stuff\WA\Workstation\TACTICAL\Reports\
>With offset set to 0, only the first letter of a tag is getting deleted and not the entire tag
Yep. That's a bug. It's supposed to be deleting the entire tag, not just the first letter. DeleteFromTag seems to work fine. It's just the DeleteToTag that's having problems. I'll fix it. In the mean time, the above suggestion of using an offset should at least give you a workaround.
>the file was cut right at the position of the first NUL character that should have been kept
Sounds like a problem in Delphi's handling of strings with NULs in them. I'll see if I can find some way of writing around it.
I'm still planning on a new release with Unicode support and variables, but both are giving me no end to problems and headaches. In the mean time, I can at least fix these known bugs. I won't have any time to work on it this weekend, but I should have a new release early next week some time.
> I'm still planning on a new release with Unicode support and
> variables,
I, for one, very eagerly await the unicode support!
> but both are giving me no end to problems and headaches.
Best of luck and
Best wishes
Idris
I just tried DeleteFromTag in a file containing NUL characters on the first line. The result was that the file was cut right at the position of the first NUL character that should have been kept. I guess this is because of a copying function stopping at the first NUL character. Please fix this!
Try using an offset of the length of the tag minus 1. This should work for DeleteToTag.
This should also be fixed, because now there is a "logical" shift in the offset.
Also, the help texts accompanying these functions seem to refer to examples that are not part of these texts.