arduino data stream format

I wounder what is the format of the serial data stream that usually is sent from computer to arduino through serial connection . my project use serial connection with arduino to send data from python(pyserial) to arduino , and when I send a string and I try to print it on LCD it appears but the first character changes to a chinese or japanese character .

so can any body explane the steam format to understand what is the wrong or what happens .

this is the arduino code and python code I used :

arduino :

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

void setup() {
    lcd.begin(16, 2);
    lcd.print("hello, world!");

void loop() {
    lcd.setCursor(5, 1);
    char rd[5] ;
    Serial.readBytesUntil('.', rd, 5);


import serial
s = serial.Serial('/dev/ttyACM0',buadrate = 9600)

using these codes when I run arduino UNO , it gives me in the first line hello world! and in the second line it gives me one black character then it converts to a chinese character!!! and when I enter the string it appears then just the first character of this string changes to that chinese character !!

P.S I found through serial monitor that the text is recived correctly but next loop it gives © as a value of rd .

thank you I found the answer here :

the problem was : arduino recives a not ended string with \0 , and when the next loop comes it goes to the position (5,1) which is the first character of the printed string on the screen and arduino prints over it the default value of the variable rd if nothing is recived .


What version of the IDE are you using? There is almost never a need to use Serial.flush(). 99.9% of the code that does use it does so incorrectly.