Why does Copy&Paste remove Carriage Return?
Posted: Thu Feb 15, 2018 8:46 am
Hello everybody,
I have found the following behavior:
I have a text file unix.txt with the following content:
To make it better readable for Windows users I replace the LF with CR LF using unix2dos.
If I now open dos.txt in pluma and copy paste (ctrl+c and ctrl+v) the content into a newly created file copied.txt the Carriage Returns are gone.
My Hex Editor shows me this:
Question 1: Why does Copy&Paste remove the Carriage Returns?
I would find it better, if Copy&Paste would just copy the data as it is and not change anything.
Question 2: As many companies have contact forms (or even job application forms) on their websites, I often write my message in pluma and then Copy&Paste it to their contact form.
Is it likely that the formatting of my text will be ruined because of missing CR, if the recipient uses Windows?
Thank you in advance
I have found the following behavior:
I have a text file unix.txt with the following content:
Code: Select all
A
B
unix2dos -n unix.txt dos.txt
If I now open dos.txt in pluma and copy paste (ctrl+c and ctrl+v) the content into a newly created file copied.txt the Carriage Returns are gone.
My Hex Editor shows me this:
Code: Select all
unix.txt: 41 0A 42 0A
dos.txt: 41 0D 0A 42 0D 0A
copied.txt: 41 0A 42 0A
I would find it better, if Copy&Paste would just copy the data as it is and not change anything.
Question 2: As many companies have contact forms (or even job application forms) on their websites, I often write my message in pluma and then Copy&Paste it to their contact form.
Is it likely that the formatting of my text will be ruined because of missing CR, if the recipient uses Windows?
Thank you in advance