mtmsuhail / ESC-POS-USB-NET

This project is a simple .NET (C#) Implementation of the Epson ESC/POS Printing using USB Device Driver.
MIT License
202 stars 86 forks source link

Error: 'IBM860' is not a supported encoding name. #10

Closed igohang closed 4 years ago

igohang commented 4 years ago

Hi! I just try to print from EPSON TM-T82X Receipt with example code and got this error. image Thank's :)

whc2001 commented 4 years ago

At this position, try to change the "IBM860" to other encoding in this list and try again?

jjosez commented 4 years ago

Same issue here. image

peng0829 commented 4 years ago

Hello I'm using net core, I used "UTF-8" It Working

mel-ramkhelawan commented 4 years ago

Hi,

How do I go about changing the encode. I'm using dotnet core 3

Thanks

eqap-melvinr commented 4 years ago

Hi,

How do I go about changing the encode. I'm using dotnet core 3

Thanks

Managed to solve it.......

kvishalv commented 4 years ago

Hi! I just try to print from EPSON TM-T82X Receipt with example code and got this error. image Thank's :)

I had a similar issue. Below code worked for me System.Text.EncodingProvider ppp = System.Text.CodePagesEncodingProvider.Instance; Encoding.RegisterProvider(ppp);

mtmsuhail commented 4 years ago

This issue solved.

Use Printer printer = new Printer("Printer Name", "Encoding Name"); printer.TestPrinter(); printer.FullPaperCut(); printer.PrintDocument();

you can try different types of encoding as shown here

chami007 commented 4 years ago

Hi! I just try to print from EPSON TM-T82X Receipt with example code and got this error. image Thank's :)

I had a similar issue. Below code worked for me System.Text.EncodingProvider ppp = System.Text.CodePagesEncodingProvider.Instance; Encoding.RegisterProvider(ppp);

Exactly what i was looking for. I hit above error with my UWP app and your solution did the trick. thanks

MarianoGomezBidondo commented 4 years ago

He had the same problem, no matter what codepage he passed as a parameter. What solved it is the answer of chami007. Thank you.

System.Text.EncodingProvider ppp = System.Text.CodePagesEncodingProvider.Instance; Encoding.RegisterProvider(ppp);

neo1mmatrix commented 2 years ago

He had the same problem, no matter what codepage he passed as a parameter. What solved it is the answer of chami007. Thank you.

System.Text.EncodingProvider ppp = System.Text.CodePagesEncodingProvider.Instance; Encoding.RegisterProvider(ppp);

Can you tell me where I must write that code please?