In message <002101c13c80$4409d4e0$2e02000a@frogger>, "Tracy Spiva" writes:
>However, the search and substitution fail for this character (ie... using
>substitute("s/\\x92/'/); or the contains with \\x92). With perl, the
>substitution works fine. Is there something I can do to get it to work with
>ORO?
I can find nothing wrong. Run the following test program (it outputs
foo'bar as expected):
public final class sub {
public static final void main(String args[]) {
Perl5Util perl = new Perl5Util();
System.out.println(perl.substitute("s/\\x92/'/g", "foo\u0092bar"));
}
}
The problem you're running into is probably in your Java I/O. Whatever
you're doing to create the input is not preserving the character. If
you're reading 8-bit extended ASCII, use an InputStream to read the
original source, else certain byte-sequences will be interpreted as UTF-8
by a Reader and what you get in terms of Java characters will not be what
you expect.
daniel