You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-dev@jakarta.apache.org by bu...@apache.org on 2001/04/19 15:56:57 UTC

[Bug 1394] New - method Perl5Util.substitue : Pb with \u or \U s/// like expression

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1394

*** shadow/1394	Thu Apr 19 06:56:57 2001
--- shadow/1394.tmp.28440	Thu Apr 19 06:56:57 2001
***************
*** 0 ****
--- 1,62 ----
+ +============================================================================+
+ | method Perl5Util.substitue : Pb with \u or \U s/// like expression         |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1394                        Product: ORO                     |
+ |       Status: NEW                         Version: 2.0.1                   |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Normal                   OS/Version: All                     |
+ |     Priority:                           Component: Main                    |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: oro-dev@jakarta.apache.org                                   |
+ |  Reported By: reboul@usa.net                                               |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ Hello,
+ 
+ I have noticed a problem when I use a \U or \u in the replacment part of s///
+ expression, while using class org.apache.oro.text.perl.Perl5Util, methode
+ String : substitute(java.lang.String expression, java.lang.String input).
+ 
+ I had reproduced this problem either on a Win2000 PC and on a AIX 4.3.3.
+ Furthemore, Ii also happen when using ORO 2.0.2 dev 2
+ 
+ When I use write like :
+ >>> Perl5Util PU = new Perl5Util() ;
+ >>> String Res = PU.substitute("s/(.*)/\U$1/","aaa") ;
+ 
+ I have got Res == "\Uaaa".
+ 
+ This alos happens using the substitueExample delivered :
+ 
+     d:\misc >java -classpath .;d:\Misc\oro-2.0.2.jar 
+ substituteExample "(.*)" "\U$1" "hello everyone"
+     substitute regex: (.*)
+     result: \Uhello everyone
+ 
+     d:\misc >java -classpath .;d:\Misc\oro-2.0.2.jar 
+ substituteExample "(.*)" "\u$1" "hello everyone"
+     substitute regex: (.*)
+     result: \uhello everyone
+ 
+ If I write and launch a small test.pl, using ActivePerl v5.6.0 on my W2000
+ 
+ >>> $test = "" ;
+ >>> foreach $argument (@ARGV){
+ >>>     $test .= $argument." " ;
+ >>> }
+ >>> print ("Source   = ", $test, "\n" ) ;
+ >>> $test =~ s/(.*)/\U$1/g ;
+ >>> print ("Result = ", $test, "\n" ) ;
+ 
+ I've got :
+ 
+ d:\misc >perl test.pl "hello everyone"
+ Source   = hello everyone
+ Result = HELLO EVERYONE
+ 
+ Bye,
+ 
+ Serge Reboul