Bug in R6.5.5 with @Contains

seems @Contains has a bug in R6.5.5 (Nov. 30, 2005):

If you want to determine whether @Newline or @Char(0) is stored within a string, @Contains returns true, if the string contains ascii characters above chr(127).

e.g.

  • @Contains(“Müller”;@Newline) returns true

  • @Contains(“holá”;@Char(0)) returns true

Subject: Bug in R6.5.5 with @Contains

Michael, I can duplicate your bug on 6.5.5. Version 7.0 is ok.

(of course, this isn’t the proper way to report bugs to Lotus, but at least we can ask other customers to duplicate)

Subject: Bug in @Contains

This is not fixed in 7.0.2

@Contains(s1 ; s2) returns wrong results under certain conditions e.g.:

  1. s1 and s2 beginning with the same characters

  2. s1 and s2 containing wraps

  3. s1 containing a special character

EXAMPLE:

s1 := {ab

ä};

s2 := {a

c};

@If(@Contains(s1 ; s2) ; @Prompt([ok] ; “Test” ; “containing”) ; @Prompt([ok] ; “Test” ; “not containing”)) ;

Test it! It is crazy!

A use case could be the scan of an postal address for a name. Finding that bug took me much time. In Notes R5 this code worked correctly.

So you have to avoid @Contains in some cases. Use @Right or @Left instead which seem to work better, e.g.

not @Contains(s1 ; s2);

but @Right(s1 + “~”; s2) != “”

greatings!

Bert