zxing/zxing — pull request #61 by mikekicinski (2014-02-17 21:06:15+00:00)
Title: Support for Code B FNC characters

I have a need to generate FNC characters for a scanner we are using. Previously the Code128Writer would crash for FNC characters, even though they were allowed in the input string. It correctly would set Code B, but if one of the ESCAPE_FNC_* characters were present, it would crash with an ArrayOutOfBoundsException since the escape characters were not in the mapping array. I've added the mapping to the correct Code B characters.

Unless I'm missing something there aren't any lot of tests around Code128Writer. I've added a test case and exercised the Code B code. It's not exhaustive but it tests my use case. I'd appreciate direction on what should be tested here - my knowledge of barcodes is pretty much the Wikipedia article.