Tk Source Code

View Ticket
Login
Ticket UUID: 1025471
Title: Problem with newline translation when appending to clipboard
Type: Bug Version: obsolete: 8.5a1
Submitter: tomk Created on: 2004-09-09 23:24:17
Subsystem: 52. [clipboard] Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Open Last Modified: 2004-09-10 15:13:12
Resolution: Invalid Closed By:
    Closed on:
Description:
To illustrate the problem perform the following command
in a wish shell on Windows

clipboard append -format STRING --
"\"hello\nworld\"\ngoodbye\tworld"

and then do a paste in cell A1 of an Excel document. At
this point the first \n has produce a line break
between "hello" and "world" in cell A1, the second \n
caused insertion to move to cell A2 and the \t caused
insertion to move to cell B2. Unfortunately there is an
extra character after "hello" and before the line
return in cell A1. I believe this is the result of
blanket newline translation in the tkWinClipboard.c
code. I don't think this issue is a "bug", but since
there isn't any work-a-round I think an option should
be added to the clipboard append command that would
allow newline translation to be turned off. The
translation needs to be truned off because the newline
translations isn't uniform over the entire clipboard
string but is based on context (i.e. is it within
quotes or not).

Tom Krehbiel
[email protected]
User Comments: dkf added on 2004-09-10 15:13:12:
Logged In: YES 
user_id=79902

Why would converting LF to CRLF be a problem? It looks to me
like the problem is in Excel, and that's really not
something we can fix...