jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Davey - Sun UK Support Engineer <michael.da...@Sun.COM>
Subject special control characters
Date Tue, 29 Jan 2002 16:08:44 GMT
[I wasn't sure whether to send this to oro-dev or oro-user.
As it deals with the internals of ORO, I have chosen oro-dev.]

Hi all,

In perl, I can do:

  perl -e '$a="\a\b\e\f\r\t\v\007\x07"; $a =~ s/\b/\t/; die unless $a ==

In ORO, I would expect to do:

  Perl5Util perl = new Perl5Util();
  result = new StringBuffer();
  input = new PatternMatcherInput ( "\\a\\b\\e\\f\\r\\t\\v\\007\\x07" );
  result = perl.substitute( "s/\\b/\\t/", input);
  assertEquals( "\007\t\033\f\r\t\013\007\007", result.toString() );

...without generating an exception (where assertEquals() compares
two strings and generates an exception if they do not match).

I have skimmed through the source to ORO and searched the archives,
but nothing jumped out at me.

I am thinking that my code doesn't work because:
  o  I am missing something (most likely)
  o  the design of substitute() is different to what I expect
  o  this is a limitation of substitute() in the current version of ORO
  o  ORO delegates escaping of control characters to Java, which is
rather limited in those it will accept

Any pointers would be most welcome.


To unsubscribe, e-mail:   <mailto:oro-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:oro-dev-help@jakarta.apache.org>

View raw message