Return-Path: Delivered-To: apmail-jakarta-oro-dev-archive@apache.org Received: (qmail 78629 invoked from network); 29 Jan 2002 16:09:31 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 29 Jan 2002 16:09:31 -0000 Received: (qmail 18193 invoked by uid 97); 29 Jan 2002 16:09:24 -0000 Delivered-To: qmlist-jakarta-archive-oro-dev@jakarta.apache.org Received: (qmail 18157 invoked by uid 97); 29 Jan 2002 16:09:23 -0000 Mailing-List: contact oro-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "ORO Developers List" Reply-To: "ORO Developers List" Delivered-To: mailing list oro-dev@jakarta.apache.org Received: (qmail 18144 invoked from network); 29 Jan 2002 16:09:22 -0000 Sender: michaed@sr-egmp02-03.uk.sun.com Message-ID: <3C56C90C.5DA79586@Sun.COM> Date: Tue, 29 Jan 2002 16:08:44 +0000 From: Michael Davey - Sun UK Support Engineer Reply-To: michael.davey@Sun.COM Organization: Sun Microsystems - Enterprise Services http://sunsolve.sun.co.uk/ X-Mailer: Mozilla 4.76C-Netscape [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: oro-dev@jakarta.apache.org Subject: special control characters Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N [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 == "\a\t\e\f\r\t\v\a\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. Cheers, -- Michael -- To unsubscribe, e-mail: For additional commands, e-mail: