How can I substitute a string which contains native chars?

Alexey Aphanasyev <[email protected]> Thu, 11 Jul 2002 16:35:01 +0400
Newsgroups gmane.comp.jakarta.oro.user
Organization Tangram Ltd.
Message-ID <[email protected]>
Hello,

I faced a problem using jakarta-oro-2.0.6.

I'm trying to substitute a string, which contains national characters.
but I got:

<quote>
java.lang.ArrayIndexOutOfBoundsException
at org.apache.oro.text.awk.AwkMatcher._search(Unknown Source)
at org.apache.oro.text.awk.AwkMatcher.contains(Unknown Source)
at org.apache.oro.text.regex.Util.substitute(Unknown Source)
at org.apache.oro.text.regex.Util.substitute(Unknown Source)
</quote>

The source code looks like this:

<quote>
PatternCompiler compiler = new AwkCompiler();
PatternMatcher matcher = new AwkMatcher();
Pattern pattern = compiler.compile("\n");
Substitution subst = new StringSubstitution("\\n");
// Substitute eol with escape sequence
String value = Util.substitute(matcher, pattern, subst,
	bundle.getString(key), Util.SUBSTITUTE_ALL);
</quote>

I have found in ORO docs the following:

"AwkMatcher only supports 8-bit ASCII. Any attempt to match Unicode
values greater than 255 will result in undefined behavior."

It that the case?

Is there any way to solve my problem?

Thanks in advance.

Alexey