Note that there are some explanatory texts on larger screens.

plurals
  1. POEncoding binary barcode in Passbook
    primarykey
    data
    text
    <p>I have to integrate Passbook with a website that provides PDF417 barcodes with data encoded in <em>binary</em> (as opposed to text), such as this:</p> <p><img src="https://i.stack.imgur.com/APgwv.gif" alt="PDF17 barcode encoded in binary"></p> <p>Is there any way I can encode this binary chunk in <strong>pass.json</strong> so that Passbook displays it on the iPhone identically to the original picture?</p> <p>Again, I <em>cannot switch</em> to text-based barcodes because I <em>do not own</em> the data. Just for clarification, the attached picture contains a PDF417 barcode that, when decoded, contains non-printable characters, such as the NULL character, which is why I refer to it as <em>binary</em>.</p> <p><strong>UPDATE</strong></p> <p>This is how the image decodes into a byte array:</p> <pre><code>01 00 01 00 02 00 E7 C4 B5 96 B8 42 94 B3 B4 75 1A D1 F2 38 92 EA B5 0E 17 5D 0B 2A AA 64 18 CC 28 62 86 E5 74 5D A3 89 09 12 6E D5 7A 1A C9 EE BF 23 9C E1 60 AD 9E DE 92 6D E5 79 99 C7 91 F1 6A D5 82 2E B6 E3 81 24 F8 0A F8 E6 44 5D 56 D2 00 00 00 00 00 00 40 0D 00 09 20 23 00 96 13 5C 10 EC 0C EA A3 E8 A3 20 30 4B 2A 20 7D 0F BB DF F7 5E FA 1E 76 F7 40 20 10 08 04 02 81 40 20 30 A3 D5 6C 1A 04 76 14 10 </code></pre> <p>This is how I try to transform it into a <em>utf-8</em> string:</p> <pre><code>{"message": "\u0001\u0000\u0001\u0000\u0002\u0000\u00E7\u00C4\u00B5\u0096\u00B8\u0042\u0094\u00B3\u00B4\u0075\u001A\u00D1\u00F2\u0038\u0092\u00EA\u00B5\u000E\u0017\u005D\u000B\u002A\u00AA\u0064\u0018\u00CC\u0028\u0062\u0086\u00E5\u0074\u005D\u00A3\u0089\u0009\u0012\u006E\u00D5\u007A\u001A\u00C9\u00EE\u00BF\u0023\u009C\u00E1\u0060\u00AD\u009E\u00DE\u0092\u006D\u00E5\u0079\u0099\u00C7\u0091\u00F1\u006A\u00D5\u0082\u002E\u00B6\u00E3\u0081\u0024\u00F8\u000A\u00F8\u00E6\u0044\u005D\u0056\u00D2\u0000\u0000\u0000\u0000\u0000\u0000\u0040\u000D\u0000\u0009\u0020\u0023\u0000\u0096\u0013\u005C\u0010\u00EC\u000C\u00EA\u00A3\u00E8\u00A3\u0020\u0030\u004B\u002A\u0020\u007D\u000F\u00BB\u00DF\u00F7\u005E\u00FA\u001E\u0076\u00F7\u0040\u0020\u0010\u0008\u0004\u0002\u0081\u0040\u0020\u0030\u00A3\u00D5\u006C\u001A\u0004\u0076\u0014\u0010";} </code></pre> <p>However, Passbook does not display an equivalent barcode. In fact, it displays just a few first bytes.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload