Re: String Strangeness
"David Lee" <[email protected]> Tue, 31 Jan 2012 08:29:42 -0500
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <[email protected]> |
I dont think "\9" is a valid escape sequence. ---------------------------------------- David A. Lee [email protected] http://www.xmlsh.org -----Original Message----- From: mark wilkinson [mailto:inyabass-71ubn78lNmomlAP/[email protected]] Sent: Tuesday, January 31, 2012 7:39 AM To: beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Subject: [Beanshell-users] String Strangeness Using bsh-2.0b5 embedded in JMeter-2.5.1 Trying to do a simple string assignment in a test script (test.bsh): String rawBCString = "288/SetEntryList/7/ITSPUAT9/Home Page2/\9"; And get the following... <snip> bsh % source("test.bsh"); // Error: // Uncaught Exception: Method Invocation this.interpreter.source : at Line: 14 : in file: /bsh/commands/source.bsh : this .interpreter .source ( filename , this .caller .namespace ) Called from method: source : at Line: 1 : in file: <unknown file> : source ( "test.bsh" ) Target exception: Sourced file: test.bsh Token Parsing Error: Lexical error at line 1, column 63. Encountered: "9" (57), after : "\"288/SetEntryList/7/ITSPUAT9/Home Page2/\\": <at unknown location> bsh % <snip> Anyone got any ideas what's going on here? I think it's something to do with escape chars but having a "9" after a "\" doesn't seem like anything odd to me. Looks like java is taking the raw string, escaping all the "\" chars and then barfing on the result.. Cheers MarkW ---------------------------------------------------------------------------- -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Beanshell-users mailing list Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/beanshell-users ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d