Serial port binary transfer changes carriage return
问题 I have been trying to implement a primitive serial file transfer protocol in C this past week and I've come across a really weird problem which I can't seem to find the solution for online. I've managed to transfer binary data over the serial port and receive it but in the process, all the "0D" bytes are converted to "0A". The following is my code. #include <stdlib.h> #include <stdio.h> /* Standard input/output definitions */ #include <string.h> /* String function definitions */ #include