andrey-ushakov / esc_pos_printer

ESC/POS (thermal, receipt) printing for Flutter & Dart
BSD 3-Clause "New" or "Revised" License
346 stars 298 forks source link

Contains invalid characters during print - ascii.dart #165

Open gvsakhil opened 1 year ago

gvsakhil commented 1 year ago

Steps to Reproduce

  1. When we print the following words its throwing an error saying - Contains Invalid Characters
  2. This is because of following string: Konaseema Paneer Biryani – with Veggies WhatsApp Image 2023-01-12 at 8 11 46 PM

Description:

  1. If you observe the string carefully "-" is very huge in above string
  2. Konaseema Paneer Biryani – with Veggies (Original String Present) vs Konaseema Paneer Biryani - with Veggies (String typed by me which has very small "-")
  3. This big "-" is causing the issue and breaking the flutter app during print
  4. If you ask me how you got the big "-"? Employees in the hotel generally copy paste names from internet (May be this bought us that big "-")

The reason for posting the error in flutter channel instead of esc_pos_printer is - The issue is from ascii.dart which is part of flutter team, so I thought this would be right place for this bug.

WhatsApp Image 2023-01-12 at 8 11 46 PM