blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.83k stars 1.39k forks source link

Terminal.println doesn't work in the same way as Blynk.virtualWrite with UTF-8 strings #372

Closed doom369 closed 5 years ago

doom369 commented 6 years ago

More details here:

https://community.blynk.cc/t/terminal-can-not-output-chinese-properly/19301

vshymanskyy commented 6 years ago

@Refenz could you please check this on the master branch?

vshymanskyy commented 6 years ago

@Refenz please verify

Refenz commented 6 years ago

@doom369 @vshymanskyy Case1:

terminal.println("我发现不能正常的输出中文") ;
terminal.println("I found that normal Chinese can not be output") ;
terminal.println("总是会有一些字符乱码,比如输出的出") ;
terminal.println("There will always be some characters garbled, such as output") ;
terminal.println("Другой текст") ;
terminal.println("Another text") ;

AR: image P.S. CNR. Now only case №2 is reproduced.

Case 2:

terminal.println("这是一个测试") ;
terminal.println("This is a test") ;
terminal.println("我发现不能正常的输出中文") ;
terminal.println("I found that normal Chinese can not be output") ;
terminal.println("总是会有一些字符乱码,比如输出的出") ;
terminal.println("There will always be some characters garbled, such as output") ;

AR: Symbols are not visible at all: image

vshymanskyy commented 6 years ago

The bug was regarding .virtualWrite acting dufferently from terminal.write. Looks ok now.

vshymanskyy commented 6 years ago

@Refenz you need to be sure that your IDE uses utf8 encoding?

vshymanskyy commented 5 years ago

@doom369 this can only be fixed on server side. I'll create a ticket UPD: https://github.com/blynkkk/blynk-server/issues/1275