title: How to encode numeric QRCode correctly?
body: <p>I'm using <a href="http://fukuchi.org/works/qrencode/manual/index.html" rel="nofollow">libqrencode</a>.<br>
  I want a QR Code with <strong>version 1</strong> (21x21) and <strong>ECC Level H</strong>. According to <a href="http://www.qrcode.com/en/about/version.html" rel="nofollow">http://www.qrcode.com/en/about/version.html</a> I can have 17 Numerics. So I do:  </p>
  
  <pre><code>QRcode *result;
  QRinput *input = QRinput_new2(1, QR_ECLEVEL_H);
  unsigned char *data = new unsigned char[17];
  for(int i = 0; i &lt; 17; i++) {
      data[i] = 0;
  }
  
  QRinput_append(input, QR_MODE_NUM, 17, data);
  
  result = QRcode_encodeInput(input);
  
  int idx = 0;
  printf("%d\n", result-&gt;width);
  for(int i = 0; i &lt; result-&gt;width; i++) {
      for(int j = 0; j &lt; result-&gt;width; j++) {
          if(result-&gt;data[idx] &amp; 1) {
              printf("%d", 1);
          } else {
              printf("%d", 0);
          }
          idx++;
      }
      printf("\n");
  }
  </code></pre>
  
  <p>But whaterver my data is, my program returns the same output.<br>
  What i'm missing here?</p>