Page 1 of 1

Warnings in the replace filter, etc

Posted: Thu Feb 09, 2012 1:45 am
by DFH
One neat thing about UI for the Replace filter is that you can get some helpful messages like,
  • "Error: Find string is blank",
    "\ at end of pattern",
    "missing )"
    "missing terminator ] for character class"
    "Warning: Search string ends in white space".
Suggestion:

When using Perl pattern matching with UTF-8 support ticked, a known problem can occur when you also have the Case sensitive replace option ticked. This is because the whole topic of character case is not generally applicable for a wide range of Unicode characters.

I therefore suggest that the UI for the Replace filter be enhanced to include the message,
"Warning: Case sensitive replace may give unexpected results for UTF-8 patterns",
i.e. when both the above conditions are met.

David

Re: Warnings in the replace filter, etc

Posted: Thu Feb 09, 2012 8:26 am
by DataMystic Support
Thanks David,

The current system does not support warnings - errors like this stop the compile/running of filters.

I've added it to the help file under both the utf-8 and Case Sensitive Replace sections.

Re: Warnings in the replace filter, etc

Posted: Fri Feb 10, 2012 6:53 am
by DFH
Simon,

I'm thinking of edit time warnings, not compile or run time.

cf. One of the existing GUI notifications at edit time is prefixed as "Warning: ..."

The observed unexpected outcomes are not prevented by the engine, so such a warning should be possible.

The circumstances are acute when the replace includes hexadecimal byte codes.

David

Re: Warnings in the replace filter, etc

Posted: Fri Feb 10, 2012 9:55 am
by DataMystic Support
I understand - that can (and will) be done.