Mon Mar 09 09:18:05 2009: Request 43889 was acted upon. Transaction: Correspondence added by kwittr...@web.de Queue: Win32-Clipboard Subject: Re: [rt.cpan.org #43889] Win32::Clipboard::GetText() doesn't convert newlines Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: kwittr...@web.de Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43889 >
----- Original Message ----- From: "Bill Luebkert via RT" <bug-win32-clipbo...@rt.cpan.org> To: <kwittr...@web.de> Sent: Monday, March 09, 2009 11:01 AM Subject: Re: [rt.cpan.org #43889] Win32::Clipboard::GetText() doesn't convert newlines <URL: https://rt.cpan.org/Ticket/Display.html?id=43889 > > K. Wittrock via RT wrote: >> >> A \n without a preceeding \r is not a line end marker on Windows. It is not >> touched by my suggestion (note the $ and the mg in >> the >> regex). To see the difference, open a text file that was created on Linux by >> Notepad. > > Not implying otherwise - just stating that \r\n may or may not be in the > clipboard. > Just because you're on Windoze, doesn't mean that there will always be Windoze > text in the clipboard. But the likelihood is certainly high. That's why I suggested to have Binary off as the default. > >> Of course I can do the "$text =~ s/\r$//mg;" by myself after each call to >> GetText. And I can automate this with a small >> subroutine >> myGetText. Then this should be told in the docu. But I would prefer a >> solution within GetText. > > At least if they document it, they are covering themselves. I suspect > changing > the normal behavior could be problematic for some, so I would be against > changing > the default behavior. Perl developers are often anxious about backward compatibility. Ok, go ahead.