mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 04:46:51 +01:00
HPlus: convert text to either GB2312 or UTF-8
This commit is contained in:
parent
c93e97f10f
commit
6ed40a21c6
@ -800,7 +800,10 @@ public class HPlusSupport extends AbstractBTLEDeviceSupport {
|
||||
cs = new byte[]{HPlusConstants.transliterateMap.get(c)};
|
||||
} else {
|
||||
try {
|
||||
cs = c.toString().getBytes("GB2312");
|
||||
if (HPlusCoordinator.getLanguage(this.gbDevice.getAddress()) == HPlusConstants.ARG_LANGUAGE_CN)
|
||||
cs = c.toString().getBytes("GB2312");
|
||||
else
|
||||
cs = c.toString().getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
//Fallback. Result string may be strange, but better than nothing
|
||||
cs = c.toString().getBytes();
|
||||
|
Loading…
Reference in New Issue
Block a user