- AuthorPosts
- February 10, 2016 at 12:34 pm #20611LifeTimerParticipant
If an exported filter contains (or at least begins with) a TAB, it cannot be re-imported again (or rather, it will just result in an empty line in the filter dialog).
The apparent reason is that the filter data is exported to a TAB-separated file, while TAB characters in the data itself are not escaped, thus messing up the structure of the TAB-separated line.
Therefore, please look into escaping TAB-characters in the exported filter TSV files.
February 11, 2016 at 11:03 am #20614Yutaka EmuraKeymasterHello,
I don’t reproduce the issue. TAB should be escaped as \t. Did you check “Use Escape Sequences” or “Regular expressions” in the Filter toolbar?
February 11, 2016 at 1:36 pm #20616LifeTimerParticipantI have a pretty good guess for why you fail to reproduce it. :-)
When entering the filter strings manually, it is impossible to enter a raw TAB character (since this will only cause the GUI focus to change to the next control), BUT when doing it from a macro it can be done, without the TAB character being escaped!
More specifically, I do like this (which is part of my normal workflow):
I first select some text containing (among other things) a TAB character, and then execute a macro constituted by the following line:
document.Filter(document.selection.Text, 0, eeFindKeepPrevious | eeFindNegative);
You will then clearly see an unescaped TAB character in the filter list inside the EmEditor GUI, and it will also tag along to the export file in case of a filter export, in turn messing up the structure of the TSV file produced by such an export, and consequently making these lines of the export file impossible to re-import.
So, the solution would then seemingly be to make sure that special characters like TAB are automatically escaped also when using macros to add filter levels containing them.
February 11, 2016 at 4:45 pm #20619Yutaka EmuraKeymasterThis is fixed on beta 13.
Thank you!February 12, 2016 at 1:37 am #20627LifeTimerParticipantExcellent, thanks!
May 11, 2016 at 3:24 am #20835LifeTimerParticipantIn the most recent beta version (16.0.0 beta 1) filter entries containing TABs don’t work to export and then reimport again. It doesn’t corrupt the filter export file line format now like before, but the TAB:s are instead double escaped when reimported now, and thus don’t work.
That is, if you export a filter like this:
\tABCD\t
it becomes the following after you re-import it:
\\tABCD\\t
and thus won’t work anymore.
(if it matters, I used the new macro functionality for exporting/importing it)
May 11, 2016 at 4:49 am #20837LifeTimerParticipantAddition: I just noticed that this problem seems to be the same for all filter items containing backslashes.
May 12, 2016 at 1:28 pm #20842Yutaka EmuraKeymasterHello LifeTimer,
I reproduced the issue. This will be fixed on the next beta version.
Thank you!
- AuthorPosts
- You must be logged in to reply to this topic.