star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
88 stars 54 forks source link

Cannot print "@" with `InternationalCharacterType.France` #120

Open LeoLeBras opened 1 month ago

LeoLeBras commented 1 month ago

Description

The @ character is printed as à with StarXpandCommand.Printer.InternationalCharacterType.France With StarXpandCommand.Printer.InternationalCharacterType.Usa, it works.

Your device where the bug occurs

Your printer

Your development environment

See System: OS: macOS 14.1 CPU: (12) x64 Apple M2 Pro Memory: 20.25 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 10.24.1 - ~/.nvm/versions/node/v10.24.1/bin/node Yarn: 1.22.22 - /usr/local/bin/yarn npm: 6.14.12 - ~/.nvm/versions/node/v10.24.1/bin/npm Watchman: 2024.05.06.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.12.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 15.4/15F31d - /usr/bin/xcodebuild Languages: Java: Not Found Python: Not Found npmPackages: @react-native-community/cli: Not Found react: 16.13.1 react-native: 0.63.5 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found

To Reproduce

const internationalCharacterType =
  StarXpandCommand.Printer.InternationalCharacterType.France
printerBuilder
  .styleInternationalCharacter(internationalCharacterType)
  .styleCharacterSpace(0)
  .styleAlignment(StarXpandCommand.Printer.Alignment.Left)
  .actionPrintText("@")
  .actionCut(StarXpandCommand.Printer.CutType.Partial)

With StarXpandCommand.Printer.InternationalCharacterType.Usa, it works !

Expected behavior

"@" shoud be printed as "@" with StarXpandCommand.Printer.InternationalCharacterType.France.

Screenshots

Additional context

bandit-ibayashi commented 1 week ago

@LeoLeBras Sorry for our late reply.

The characters outputted have been designed to change based on the specification of International Characters, allowing for the representation of characters used in that specific country or region with single-byte characters.

image

While we do not plan to change this specification, we recommend utilizing the UTF-8 support available in your mC-Print3 as an alternative. Alternatively, if there are specific locations where the @ symbol is required, you may consider switching the International Characters to USA for those instances, and then reverting back to France after the @ symbol.

Thank you for your understanding.