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

Not working with encoding Shift_JIS #73

Open
ryantranvortech opened this issue Aug 25, 2024 · 0 comments
Open

Not working with encoding Shift_JIS #73

ryantranvortech opened this issue Aug 25, 2024 · 0 comments

Comments

@ryantranvortech
Copy link

ryantranvortech commented Aug 25, 2024

It's awesome. Thanks so much!

Printer printer = new Printer("EPSON TM-T(203dpi_1) Receipt6", "Shift_JIS");

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
Encoding encoding = Encoding.GetEncoding("Shift_JIS");

printer.InitializePrint();

printer.Append(new byte[] { 0x1B, 0x74, 0x12 });

printer.SetLineHeight(24);

string japaneseText = "テスト";
byte[] japaneseBytes = encoding.GetBytes(japaneseText);

printer.Append(japaneseBytes);

printer.FullPaperCut();
printer.PrintDocument();

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

1 participant