Mon Mar 09 06:01:04 2009: Request 43889 was acted upon.
Transaction: Correspondence added by dbec...@roadrunner.com
       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 >


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.

> 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.

Reply via email to