Commit Graph

14 Commits

Author SHA1 Message Date
Michael Billington 7b68d97f5f test fixes - just case-changes to match code page names, seems to need 'future' pip module 2016-09-13 20:28:54 +10:00
Michael Billington 7a7ea23628 fixes to arguments for _encode_char 2016-09-11 21:08:04 +10:00
Michael Billington 83f926758c adjust order in _encode_char to prioritise ASCII; ' ' is used in the character list to flag characters with no known UTF-8 code, better not encode as these 2016-09-11 21:06:44 +10:00
Michael Billington 9a65945fcd re-work encoder to consult the capabilities database and use custom code pages or python encoder as necessary 2016-09-11 21:03:55 +10:00
Michael Billington d9a6960f07 efficiency improvements for backwards encoding 2016-09-11 20:21:30 +10:00
Michael Billington b5bf1125db reverse the lookup order to correct encoding issues 2016-09-11 17:17:22 +10:00
Michael Elsdörfer ddc93d7369 Fix byte format() on Python 3. 2016-08-30 18:06:34 +02:00
Michael Elsdörfer 73ef8c4c0a Write as many characters as possible at once. 2016-08-30 17:39:26 +02:00
Michael Elsdörfer 9aa1335fd2 Improve codepage selection logic. 2016-08-30 17:13:05 +02:00
Michael Elsdörfer 2f89f3fe3a Port to current version of escpos-printer-db. 2016-08-30 17:08:27 +02:00
Michael Elsdörfer c7864fd785 Largely rewrite the magic text encoding feature. 2016-08-27 11:28:52 +02:00
Patrick Kanzler 87a6647053 fix force-encoding REBASE (contains todos)
* fixed the code of forced-encoding in order to make it work
* extended unittest for forced-encoding
* fixed the constant for Katakana-encoding
2016-08-02 04:42:21 +02:00
Patrick Kanzler f0bdbc4322 doc changelog and todos updated 2016-08-02 04:42:21 +02:00
Patrick Kanzler 0cfedb5706 add automatic codepage-changing
This code is adapted from the works by Frédéric Van der Essen in
pyxmlescpos.
I had to adapt the code completely in order to make it compatible with
modern unicode-handling

Further changes:
* improve text unittests in CLI and MagicEncode with hypothesis
* add feature force_encoding in order to enable old behaviour
* disable cli_text_test (for now)
* fix charcode(): it does now cooperate with the new structure
* remove redundant variable codepage from class Escpos
2016-08-02 04:42:21 +02:00