Giter VIP home page Giter VIP logo

Comments (4)

woctezuma avatar woctezuma commented on May 27, 2024

There is no error if I run:

 steamctl apps list

I can even get the character to be rendered correctly:

208570 Dishonored: Dunwall City Trials DLC
208575 Dishonored: The Knife of Dunwall
208580 STAR WARS™ Knights of the Old Republic™ II: The Sith Lords™
208610 Skullgirls ∞Endless Beta∞
208620 Midnight Mysteries: Salem Witch Trials
208630 Midnight Mysteries 3: Devil on the Mississippi
208640 Midnight Mysteries 4: Haunted Houdini

However, the list is really long, so it gets truncated by the Windows console, and it would be handier to save it to a text file.

I remember encountering this issue in the past, without reporting it, and then editing the code to save the output to a file.
I wonder if there is a better fix.

On a side-note, I am not sure if the issue only happens on Windows.

from steamctl.

woctezuma avatar woctezuma commented on May 27, 2024

The error can be reproduced with a Python file scratch_1.py, unrelated to steamctl:

print('∞')

python scratch_1.py

Output:


python scratch_1.py > temp.txt

Output:

Traceback (most recent call last):
  File "C:\Users\Wok\AppData\Roaming\JetBrains\PyCharmCE2022.2\scratches\scratch_1.py", line 1, in <module>
    print('∞')
  File "C:\Users\Wok\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u221e' in position 0: character maps to <undefined>

from steamctl.

rossengeorgiev avatar rossengeorgiev commented on May 27, 2024

Use a terminal that supports utf8 and is configured to use utf8

from steamctl.

woctezuma avatar woctezuma commented on May 27, 2024

Use a terminal that supports utf8 and is configured to use utf8

That is the case. The issue is with the redirection to a file, which does not seem to work properly on Windows.

For instance, in the picture below, there is no error, but an inconsistency.

echoecho> temp.txt
type temp.txt

Windows terminal: echo ∞

I can fix the inconsistency with chcp 65001, but that does not fix the error when redirecting the output of a Python script.

chcp 65001
echoecho> temp.txt
type temp.txt

Windows terminal: chcp 65001

For the error with Python, I have a small workaround.

from steamctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.