Here are the examples of the csharp api class ZXing.PDF417.Internal.PDF417HighLevelEncoder.getEncoder(System.Text.Encoding) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
0
1. Example
View licenseprivate static byte[] toBytes(String msg, Encoding encoding) { return getEncoder(encoding).GetBytes(msg); }
0
2. Example
View licenseprivate static byte[] toBytes(char msg, Encoding encoding) { return getEncoder(encoding).GetBytes(new []{msg}); }
0
3. Example
View licenseprivate static int determineConsecutiveBinaryCount(String msg, byte[] bytes, int startpos, Encoding encoding) { int len = msg.Length; int idx = startpos; int idxb = idx; // bytes index (may differ from idx for utf-8 and other unicode encodings) encoding = getEncoder(encoding); while (idx < len) { char ch = msg[idx]; int numericCount = 0; while (numericCount < 13 && isDigit(ch)) { numericCount++; //textCount++; int i = idx + numericCount; if (i >= len) { break; } ch = msg[i]; } if (numericCount >= 13) { return idx - startpos; } ch = msg[idx]; // .Net fallback strategie: REPLACEMENT_CHARACTER 0x3F if (bytes[idxb] == 63 && ch != '?') { throw new WriterException("Non-encodable character detected: " + ch + " (Unicode: " + (int) ch + ')'); } idx++; idxb++; if (toBytes(ch, encoding).Length > 1) // for non-ascii symbols idxb++; } return idx - startpos; }