In case of TFTP, one can choose between "ASCII" or "octet" mode. As I have understood, 00001010(new-line) or 00001101(carriage return) bit streams in a binary file will get some sort of special treatment in ASCII mode? However, I created a file containing those characters:
root@A58:~# printf '\n' | xxd | xxd -r > bfile; printf '\r' | xxd | xxd -r >> bfile; printf 'A' | xxd | xxd -r >> bfile
root@A58:~# xxd -b bfile
0000000: 00001010 00001101 01000001 ..A
root@A58:~#
..and when I uploaded this file from TFTP client to TFTP server using both "octet" and "netascii" modes, the file reached the TFTP server in same condition and had exactly the same content:
T42 ~ # cmp /srv/tftp/reverse_ascii /srv/tftp/reverse_binary
T42 ~ #
Did I do something wrong? Or how should ASCII mode mangle the binary data?