escpos-php
escpos-php copied to clipboard
Use of special characters (ÄÜÖ) in receipt examples
trafficstars
Up to now, if special characters such as ÄÜÖ were used in the receipt examples, there were problems with the distance to the margin. It looked like this:

With function utf8_decode before str_pad so that the margin is calculated "correctly" and utf8_encode after it, it works as it should:

(The printer I use is the Epson TM-T88IV)
You are adding a issue on that example, utf8_encode is going to be deprecated
https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated