escpos-php icon indicating copy to clipboard operation
escpos-php copied to clipboard

Use of special characters (ÄÜÖ) in receipt examples

Open rottifant opened this issue 3 years ago • 1 comments
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:

image

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

image

(The printer I use is the Epson TM-T88IV)

rottifant avatar Jun 20 '22 16:06 rottifant

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

angeljqv avatar Aug 30 '22 14:08 angeljqv