Skip to content

Commit

Permalink
Add encoding informations for barcode scanners
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannCOSTE committed May 26, 2020
1 parent a44bae8 commit 404d4ff
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,37 @@ $dataUri = $qrCode->writeDataUri();

![QR Code](https://endroid.nl/qr-code/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png)

### Encoding
You can pick one of these values for encoding:
* `ISO-8859-1`
* `ISO-8859-2`
* `ISO-8859-3`
* `ISO-8859-4`
* `ISO-8859-5`
* `ISO-8859-6`
* `ISO-8859-7`
* `ISO-8859-8`
* `ISO-8859-9`
* `ISO-8859-10`
* `ISO-8859-11`
* `ISO-8859-12`
* `ISO-8859-13`
* `ISO-8859-14`
* `ISO-8859-15`
* `ISO-8859-16`
* `Shift_JIS`
* `windows-1250`
* `windows-1251`
* `windows-1252`
* `windows-1256`
* `UTF-16BE`
* `UTF-8`
* `US-ASCII`
* `GBK`
* `EUC-KR`

If you use a barcode scanner you can have some troubles while reading the generated QR codes. Depending on the encoding you chose you will have an extra amount of data corresponding to the ECI block. Some barcode scanner are not programmed to interpret this block of information. For exemple the ECI block for `UTF-8` is `000026` so the above exemple will produce : `\000026Life is too short to be generating QR codes`. To ensure a maximum compatibility you can use the `ISO-8859-1` encoding that is the default encoding used by barcode scanners.

## Readability

The readability of a QR code is primarily determined by the size, the input
Expand Down

0 comments on commit 404d4ff

Please sign in to comment.