grails-console icon indicating copy to clipboard operation
grails-console copied to clipboard

New lines output

Open Sabst opened this issue 10 years ago • 5 comments

Hi there,

As a 1.3 user, I noticed that new lines are not correctly handled anymore in newer versions. I tested with 1.4.4 and later. If the output looks ok in the console, copy/paste ignores new lines and the result is not usable.

To reproduce it, you can just run something like: println "line1" println "line2"

And once you copy/paste the result into another application, you get: line1line2

Thank you for your support. Stephane.

Sabst avatar Nov 18 '14 12:11 Sabst

Do you still see this with the latest (v1.5.2)? If so, which app are you pasting to?

sheehan avatar Nov 26 '14 04:11 sheehan

Yes, also with the latest version. In my case this is both on Windows and Linux using: (copy) recent/latest versions of mainstream web browsers (paste) usual desktop apps: MSOffice/LibreOffice/Eclipse/Notepad++/Emacs/Konsole/Thunderbird... or the previous browser itself.

No exception to the failure so far. The newline is apparently replaced by a whitespace.


Using version 1.4 and later including 1.5.2:

    In the console:
    println "1234"
    println "5678"

    Pasting the result into an application, you get:
    1234 5678

    Dump of the resulting file:
    $ od -t x1 /tmp/1
    0000000 31 32 33 34
      20 35 36 37 38 0a

Using version 1.3...

     Pasting the result into an application, you get:
    1234
    5678

    Dump of the resulting file:
    $ od -t x1 /tmp/2
    0000000 31 32 33 34 0a 35 36 37 38 0a

Sabst avatar Nov 26 '14 20:11 Sabst

I was able to reproduce it, but only in firefox. Safari, IE and chrome all work correctly for me. Possibly this bug? https://bugzilla.mozilla.org/show_bug.cgi?id=116083

sheehan avatar Nov 26 '14 21:11 sheehan

Yes maybe but isn't that a regression ? Using the same browser, it used to work, for example, with 1.3.

Sabst avatar Nov 28 '14 12:11 Sabst

Yeah, I'll take a look at the change when I get a sec.

sheehan avatar Dec 02 '14 04:12 sheehan