mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
NO_ICONV support in aztec decoder
git-svn-id: https://zxing.googlecode.com/svn/trunk@2220 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
b10e1c6b0e
commit
c4b7431a44
|
@ -20,7 +20,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zxing/aztec/decoder/Decoder.h>
|
#include <zxing/aztec/decoder/Decoder.h>
|
||||||
|
#ifndef NO_ICONV
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
#endif
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <zxing/FormatException.h>
|
#include <zxing/FormatException.h>
|
||||||
#include <zxing/common/reedsolomon/ReedSolomonDecoder.h>
|
#include <zxing/common/reedsolomon/ReedSolomonDecoder.h>
|
||||||
|
@ -39,6 +41,7 @@ using std::string;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
void add(string& result, unsigned char character) {
|
void add(string& result, unsigned char character) {
|
||||||
|
#ifndef NO_ICONV
|
||||||
char s[] = { character & 0xff };
|
char s[] = { character & 0xff };
|
||||||
char* ss = s;
|
char* ss = s;
|
||||||
size_t sl = sizeof(s);
|
size_t sl = sizeof(s);
|
||||||
|
@ -50,6 +53,9 @@ namespace {
|
||||||
iconv_close(ic);
|
iconv_close(ic);
|
||||||
d[sizeof(d)-dl] = 0;
|
d[sizeof(d)-dl] = 0;
|
||||||
result.append(d);
|
result.append(d);
|
||||||
|
#else
|
||||||
|
result.push_back(character);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const int NB_BITS_COMPACT[] = {
|
const int NB_BITS_COMPACT[] = {
|
||||||
|
|
Loading…
Reference in a new issue