Skip to content

qr.exe --ascii produces PNG when redirected to a file #428

Description

@Luddite-Geekazoid

This produces a PNG file: qr.exe content --ascii --output=qrcode.txt
This produces an error: qr.exe content --ascii>qrcode.txt
(The error is: UnicodeEncodeError: 'charmap' codec can't encode character '\u2588' in position 0: character maps to ). It happens regardless of whether I force ANSI (with /A) or Unicode (with /U).

Workaround: To create a QRCode file with (extended) ascii characters, invoke:
qr.exe content --ascii and then copy the characters from the console and paste into the file.

Perhaps this is a bug in just the documentation; qr -h says "--ascii Print as ascii even if stdout is piped."

version is 8.2
OS is Windows 10

Please let me know if you need any more info or testing.

  • LG

Activity

  1. SmileyChris commented on Sep 17, 2026

    @SmileyChris
    Member

    Yeah, this should be a good low-hanging issue to tackle!

    You can start with a work-in-progress pull request if you like, I'll review and give any comments or instructions. Nothing specific you'll need to know from the start. Just follow standard python coding styles and match the test format 🥇

    (oh, and we should definitely fix / improve the documentation to match actual functionality)

  2. SmileyChris commented on Sep 17, 2026

    @SmileyChris
    Member

    @agyeibeamantey8 -- if you see the top of this issue though, you'll see that there is a pull request already done. You don't want to duplicate this work, so maybe another issue is worth doing.

    If you want to review that PR though, it could be a good onboarding task

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions