When doing copy/paste from Ubuntu to Windows utilities seem to always get double line spacing -- as though LF/CR is being interpreted incorrectly.
Seems to me this is a recent phenomena (I don't remember this always happening but it may have started several versions ago).
Mike
Copy/paste double line spacing
Re: Copy/paste double line spacing
I would on Windows install Notepad++ and enable the "View->Show Symbol->Show End of line" menu option and look at what the EOL is.
Most MS built Windows apps hate Linux's standard EOL.
Most MS built Windows apps hate Linux's standard EOL.
-
- Site Moderator
- Posts: 39156
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Copy/paste double line spacing
I'm not aware that VirtualBox has any role in this at all. I.e. it does not translate text files or clipboard objects for an assumed consumer.MadDogBlack wrote:When doing copy/paste from Ubuntu to Windows utilities seem to always get double line spacing -- as though LF/CR is being interpreted incorrectly.
-
- Volunteer
- Posts: 5668
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Copy/paste double line spacing
This can happen when a text file on Linux uses the Windows style line endings (CR+LF). On Linux, many text editors display only one line break in this case, the X11 clipboard gets the CR+LF, the VirtualBox Shared Clipboard then replaces the LF with CR+LF, because the Windows clipboard requires CR+LF line endings, leading to a CR+CR+LF sequence, which is displayed as two line breaks in Windows text editors.MadDogBlack wrote:When doing copy/paste from Ubuntu to Windows utilities seem to always get double line spacing -- as though LF/CR is being interpreted incorrectly.
Note that on Linux, CR is a character like any other, and recognizing the already existing CR+LF sequence wouldn't be the Linux way. Text editors display one line break for the convenience of the users nonetheless.
If you'd like to see the issue for yourself, you can try the following: On a Windows host, zip a VBox.log file (or any other Windows text file), copy the zip file to a Linux guest, unzip it, open it in a text editor, copy some lines and paste them in a text editor on the Windows host. In the VirtualBox source code, the main work horse is clipConvertDataFromX11Worker.mpack wrote:I'm not aware that VirtualBox has any role in this at all. I.e. it does not translate text files or clipboard objects for an assumed consumer.