RUB-NDS / PRET

Printer Exploitation Toolkit - The tool that made dumpster diving obsolete.
http://hacking-printers.net
GNU General Public License v2.0
3.93k stars 611 forks source link

ConvertProgram Error! #32

Open zzzsleepsin opened 5 years ago

zzzsleepsin commented 5 years ago

Hi, When I use the print command after connecting to the printer, I get an error saying "Can not convertProgram Error ('utf8' codec can not decode byte 0xc0 in position 2: invalid start bytes). When I search Google, I try to change the code to utf16. I looked up each Python script and I can not find the code in the language set. Let me know how to fix the error.

ghost commented 2 years ago

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