diff options
| author | Felix Hanley <felix@userspace.com.au> | 2017-03-19 15:19:42 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2017-03-19 15:19:42 +0000 |
| commit | 8a541d499b6f117cd3a81e475ee779ba60fc0637 (patch) | |
| tree | 7b3b5326235725ab93056b5ff4637d987fb0a7b6 /vendor/github.com/boombuler/barcode/qr/unicode.go | |
| parent | fe847b2d01060044274d20d2c35ae01a684d4ee3 (diff) | |
| download | crjw-maps-master.tar.gz crjw-maps-master.tar.bz2 | |
Diffstat (limited to 'vendor/github.com/boombuler/barcode/qr/unicode.go')
| -rw-r--r-- | vendor/github.com/boombuler/barcode/qr/unicode.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/github.com/boombuler/barcode/qr/unicode.go b/vendor/github.com/boombuler/barcode/qr/unicode.go deleted file mode 100644 index a9135ab..0000000 --- a/vendor/github.com/boombuler/barcode/qr/unicode.go +++ /dev/null @@ -1,27 +0,0 @@ -package qr - -import ( - "errors" - - "github.com/boombuler/barcode/utils" -) - -func encodeUnicode(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { - data := []byte(content) - - vi := findSmallestVersionInfo(ecl, byteMode, len(data)*8) - if vi == nil { - return nil, nil, errors.New("To much data to encode") - } - - // It's not correct to add the unicode bytes to the result directly but most readers can't handle the - // required ECI header... - res := new(utils.BitList) - res.AddBits(int(byteMode), 4) - res.AddBits(len(content), vi.charCountBits(byteMode)) - for _, b := range data { - res.AddByte(b) - } - addPaddingAndTerminator(res, vi) - return res, vi, nil -} |
