[Dart] Ctrl characters in test output

Blezek, Daniel J (CRD) blezek at crd.ge.com
Tue, 22 Jan 2002 10:16:59 -0500


Brad, Amitha,

> > Clearly, such characters need to be escaped somehow. I don't know
> > enough xml/xsl to know whether the escape should be done client-side
> > or server side.
> For some reason we never encountered this problem before, and 

  This statement isn't quite true, we have seen this a long time ago, and the solution at the time
was to change the test to _not_ spit out control characters.  I would suggest that we have a look at
all non-ascii characters and rather than replace them with a "big-red-flag", simply put them in as ^Q
or whatever.  For some tests, a control character in the output might be what you want, who knows?
But on the other hand, a "big-red-flag" might also be a good idea.

-dan

> proc clean_null_char {str} {
>      set res ""
>      set len [string length $str]
>      for {set i 0} {$i < $len} {incr i} {
>          set char [string index $str $i]
>          if {$char != "\0"} {
>              append res $char
>          }
>      }
>      return $res
> }
> 
> puts [clean_null_char "ab\0cd"]
> 
> _______________________________________________
> Dart mailing list
> Dart at public.kitware.com
> http://public.kitware.com/mailman/listinfo/dart
>