This is demonstrated by the #765 test.
If I run two different MagicEncoders in a succession, the second one inherits the Encoder configuration from the first one:
encode = MagicEncode(
driver,
encoder=Encoder({"CP1251": 1}),
)
encode.write("і is like i.")
assert driver.output == b"\x1bt\x01\xb3 is like i."
encode = MagicEncode(
driver,
encoder=Encoder({"CP855": 2}),
)
encode.write("і is like i.")
assert driver.output == b"\x1bt\x02\x8a is like i."
The CP855 MagicEncoder inherits the settings from the CP1251 encoder, this is surprising. Are some data stored in the driver?
This is demonstrated by the #765 test.
If I run two different
MagicEncodersin a succession, the second one inherits the Encoder configuration from the first one:The CP855 MagicEncoder inherits the settings from the CP1251 encoder, this is surprising. Are some data stored in the
driver?