capacitor-community / bluetooth-le

Capacitor plugin for Bluetooth Low Energy
MIT License
284 stars 86 forks source link

Unicode Support #687

Closed garudaonekh closed 2 months ago

garudaonekh commented 2 months ago

Hi, I try to send Unicode and convert it to String using dataViewToText() but it shows garbage value. "កំពស់ទឹក"

Any suggestion to convert or support unicode?

Thanks;

peitschie commented 2 months ago

Generally you'd be using TextEncoder to convert a string into bytes. I'm not entirely sure what you're wanting to achieve here though?

garudaonekh commented 2 months ago

My data will be mixed of ASCII and Unicode.

garudaonekh commented 2 months ago

Thanks. I have to use TextDecoder class