You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICS, cordovarduino's documentation does not state anything about character encodings, or how characters with charCode >= 128 will be handled by serial.write(). However, handling this differently depending on the platform may be surprising to users.
The text was updated successfully, but these errors were encountered:
I noticed that the native
writeSerial()
on Androidhttps://github.com/xseignard/cordovarduino/blob/master/src/android/fr/drangies/cordova/serial/Serial.java#L284
uses
getBytes()
, which "encodes the string using the platform's default charset", which seems to always be UTF-8 on Androidhttps://developer.android.com/reference/java/nio/charset/Charset.html
while on Ubuntu the string argument is explicitly converted to Latin-1:
https://github.com/xseignard/cordovarduino/blob/master/src/ubuntu/serial.cpp#L94
AFAICS,
cordovarduino
's documentation does not state anything about character encodings, or how characters withcharCode
>= 128 will be handled byserial.write()
. However, handling this differently depending on the platform may be surprising to users.The text was updated successfully, but these errors were encountered: