Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'utf-8' codec can't decode byte 0x8f in position 0: invalid start byte #58

Open
0xCGonzalo opened this issue Dec 16, 2021 · 3 comments
Open

Comments

@0xCGonzalo
Copy link

Hi, I have a problem when I want to download a file from my server:

1

Am I right if I assume that the tool can only download only some file extensions?

@ghost
Copy link

ghost commented Sep 18, 2022

Try this one:

edit the script that will send commands in the language of your printer (pjl.py, pcl.py or postscript.py)
Add this:
import sys
reload(sys)
sys.setdefaultencoding('iso-8859-1')
i hope this helps you

@0xCGonzalo
Copy link
Author

Thank you very much!

@HughHood
Copy link

ghost,

I can't thank you enough for that. It helps much with certain files containing 8-bit characters.

Between using your solution, running PRET under python 2.7 and using the 'traversal' command instead of the 'cd' command, I'm able to interact as easily as I've ever been with the hard drive storage on our LaserJets.

That includes reading/writing font files (after conversion by Web JetAdmin) and updating my pclResourceFile.

Good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants