Skip to content

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

Open
rottifant wants to merge 1 commit into
mike42:developmentfrom
rottifant:development
Open

Use of special characters (ÄÜÖ) in receipt examples#1184
rottifant wants to merge 1 commit into
mike42:developmentfrom
rottifant:development

Conversation

@rottifant

Copy link
Copy Markdown

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)

@angeljqv

Copy link
Copy Markdown

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

@mike42 mike42 added the example label Jul 1, 2026
@mike42

mike42 commented Jul 1, 2026

Copy link
Copy Markdown
Owner

It's a fair point though that the example shows a way to align data that only works correctly for ASCII.

I'll leave this PR open for now - I'm open to including presentation of tabular data in the scope of library, it's a common theme on the bug tracker and it's easy to get it wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants