Closed GoogleCodeExporter closed 8 years ago
I can avoid this bug if I replace the regexp control character (as segment
separator) before I parse it.
<pre>
String disallowed = "|^$.()\\?+*{}[]";
char segmentSeparator = x12Content.charAt(X12Parser.POS_SEGMENT);
if (disallowed.indexOf(segmentSeparator)>=0) {
String allowed = "~&@#%ߣĐ";
for (int i=0; i<allowed.length(); i++) {
char c = allowed.charAt(i);
if (x12Content.indexOf(c)<0) {
x12Content = x12Content.replace(segmentSeparator, c);
break;
}
}
}
</pre>
Original comment by kokog.pr...@gmail.com
on 7 Nov 2012 at 3:29
[deleted comment]
Code fix has been added to the trunk. New version will be released soon. Till
then build from the source. Thanks for your suggestions.
Original comment by p2b...@gmail.com
on 19 Apr 2013 at 9:09
Original comment by p2b...@gmail.com
on 21 May 2013 at 6:08
Original issue reported on code.google.com by
damien.b...@gmail.com
on 19 Dec 2011 at 5:56