Cuecat in X Windows (Linux) prepends escape chars
Status: Alpha
Brought to you by:
jlpatte2
I hooked the barcode scanner up to my Linux box, and the jQKat class worked fine after a few minor adjustments.
1) I made a change similar to the one suggested in bug #114337.
2) In X Windows, the escape characters the scanner generates aren't stripped out by the terminal session.
The output from the scan looks a lot like: "^[^[[21~.C3nZ...etc.."
In jQKat::decode, I fixed this by replacing the exisiting "Strip out beginning and ending period" code with this:
// Strip off leading and ending periods
inVal = inVal.substring(inVal.indexOf(".")+1,inVal.lastIndexOf(".")-1);
YMMV, I'm still weak on Java, so there might be better methods.
oops - make that:
inVal = inVal.substring(inVal.indexOf(".")+1,inVal.lastIndexOf(".") );
I forgot substring() doesn't include the character at the second argument.