Copy/paste Bug??
Moderators: Cat_7, Ronald P. Regensburg, ClockWise
Copy/paste Bug??
I have noticed this with the official and recent Windows SheepShaver builds. When coping/pasting text from most text programs, SheepShaver is adding an extra invisible character to the end of the pasted text. A quick example would be to open a text file with SimpleText. Copy a section of text and paste somewhere in the same file. Now use the right arrow key on your keyboard and tap through the pasted text. When you reach the end the cursor will appear to not move for one tap.
This those not seem to be much of a problem when using the text files in Mac OS, but when converting and using them in windows, they become spaces.
This those not seem to be much of a problem when using the text files in Mac OS, but when converting and using them in windows, they become spaces.
- Ronald P. Regensburg
- Expert User
- Posts: 7821
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Re: Copy/paste Bug??
A text file that was created in SimpleText (or another application in MacOS) or a text file that was created in a Windows application and transferred into SheepShaver?Binder wrote:A quick example would be to open a text file with SimpleText.
-
- Tinkerer
- Posts: 83
- Joined: Sat Apr 12, 2008 8:22 pm
Binder
Tried it and my results are as Kelvin's, but in OS 9.0 in Ronald's latest build on a PPC machine, not Intel.
Also copied the test text to a proper text editor and examined it for extra/hidden/etc. characters and found none. The right-arrow stepping in SimpleText also behaved as I expect, no extra characters.
I am using the hardware cursor version, if that might be significant (I don't think so.)
Tried it and my results are as Kelvin's, but in OS 9.0 in Ronald's latest build on a PPC machine, not Intel.
Also copied the test text to a proper text editor and examined it for extra/hidden/etc. characters and found none. The right-arrow stepping in SimpleText also behaved as I expect, no extra characters.
I am using the hardware cursor version, if that might be significant (I don't think so.)
- Ronald P. Regensburg
- Expert User
- Posts: 7821
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
As for me, yes, there is an additional character at the end of the line, but only with the new build. The character code (as I see in UltraEdit in hex mode) is 00.
In addition, I noticed transfering text via clipboard from SS (new build) to Windows is more problematic and uncomplete, compared to Gwenole (2006/05/15) build.
Windows XP SP3
SheepShaver in fullscreen mode (both builds)
SDL 1.2.10.0
MacOS 9.0.4
In addition, I noticed transfering text via clipboard from SS (new build) to Windows is more problematic and uncomplete, compared to Gwenole (2006/05/15) build.
Windows XP SP3
SheepShaver in fullscreen mode (both builds)
SDL 1.2.10.0
MacOS 9.0.4
Thank you everyone for trying it out. So it seems to only effect windows builds.
ClockWise,
Are you testing the windows build? with OS 9.0.4?
boyanml,
Are you using the same setup when you tested the different builds? (just replacing the .exe and .sdl files?)
I have not been able to get any windows build working correctly.I only have OS 9.0.4 to test with.
Also if I copy a section of a file name and paste to another file name, same problem. Looks like the OS's clipboard is being affected.
ClockWise,
Are you testing the windows build? with OS 9.0.4?
boyanml,
Are you using the same setup when you tested the different builds? (just replacing the .exe and .sdl files?)
I have not been able to get any windows build working correctly.I only have OS 9.0.4 to test with.
Also if I copy a section of a file name and paste to another file name, same problem. Looks like the OS's clipboard is being affected.
-
- Student Driver
- Posts: 16
- Joined: Tue Apr 15, 2008 10:42 pm
- Location: Chicago
Copy-Paste problem in SSWin
I ran into the copy-paste bug when authenticating my old copy of DropStuff. I copied the registration key from a WordPerfect file where I keep such things and pasted it into the registration dialog box, only to be told that what I had entered was invalid. This was before this E-Maculation thread appeared. So then I tried entering left-delete (backspace) once after pasting in the number. The number did not change in appearance, but apparently this effectively removed some invisible character from the end of the number, because this time the registration was accepted. When I paste items into WordPerfect, no additional characters show in the main window or in the Reveal Codes window. Strange.
I am not 100% sure but can it be an issue of a combined CR+LF character (both invisble) that is present at the end of each text line in Windows while OS9 only use a single CR character and therefore refuses to use the extra ( LF ) character ?
see: http://en.wikipedia.org/wiki/Newline
Wim
see: http://en.wikipedia.org/wiki/Newline
Wim
i can confirm the bug on sheepshaver for windows.
strangely, it only occurs when copying text from/into DIFFERENT applications (or filenames from the desktop).
it can easily be reproduced when copying a filename into a hexeditor. the value 00 HEX is always added at the end.
with simpletext it's not that obvious: copy a filename or foldername into simpletext and delete the last char: you will see no change, because the 00 HEX is not displayed in simpletext (but it nevertheless gets deleted).
it also works the other way round: write a name, copy the name, create a new folder and paste the name into it.
when you delete the last char, nothing will happen - again, because it's invisible.
if you paste a name from the clipboard, then select the name and copy/paste it back to simpletxt, you will have two 00 HEX chars. you can do this many times and every time a 00 HEX char will be added.
the strangest thing is: it does not happen if you copy and paste text into the same application. copying and pasting from and into simpletext is OK, but pasting from/into a different texteditor adds 00 HEX. and the other way round.
tested on mac OS 7.61 and OS 9.04.
this does NOT happen on a "real" mac, must be a sheepshaver-bug.
edit:
here is an easy check - copy the name of a file, launch sherlock (or apple+f), paste the name into the search-window and perform a search.
the file will never be found, because of the 00 HEX at the end.
strangely, it only occurs when copying text from/into DIFFERENT applications (or filenames from the desktop).
it can easily be reproduced when copying a filename into a hexeditor. the value 00 HEX is always added at the end.
with simpletext it's not that obvious: copy a filename or foldername into simpletext and delete the last char: you will see no change, because the 00 HEX is not displayed in simpletext (but it nevertheless gets deleted).
it also works the other way round: write a name, copy the name, create a new folder and paste the name into it.
when you delete the last char, nothing will happen - again, because it's invisible.
if you paste a name from the clipboard, then select the name and copy/paste it back to simpletxt, you will have two 00 HEX chars. you can do this many times and every time a 00 HEX char will be added.
the strangest thing is: it does not happen if you copy and paste text into the same application. copying and pasting from and into simpletext is OK, but pasting from/into a different texteditor adds 00 HEX. and the other way round.
tested on mac OS 7.61 and OS 9.04.
this does NOT happen on a "real" mac, must be a sheepshaver-bug.
edit:
here is an easy check - copy the name of a file, launch sherlock (or apple+f), paste the name into the search-window and perform a search.
the file will never be found, because of the 00 HEX at the end.
Hi again Guys,
Is there a certain place in the source code I can look to find the cause of this bug??
To recap, the problem is only happening on the windows builds, basically when copying text and then pasting, SS is adding an invisible character that some programs have a hard time dealing with. For example, I would like to use SS for a proprietary programming language were the text gets compiled. Those extra characters are a nightmare to hunt down and delete.
Thanks,
Bill.
Is there a certain place in the source code I can look to find the cause of this bug??
To recap, the problem is only happening on the windows builds, basically when copying text and then pasting, SS is adding an invisible character that some programs have a hard time dealing with. For example, I would like to use SS for a proprietary programming language were the text gets compiled. Those extra characters are a nightmare to hunt down and delete.
Thanks,
Bill.
-
- Tinkerer
- Posts: 83
- Joined: Sat Apr 12, 2008 8:22 pm
A quick examination of BasiliskII/src/Windows/clip_windows.cpp reveals a possible cause. When adding a text string to the Windows ClipBoard, the function do_putscrap() adds a null terminator to the end of the string, as required by SetClipboardData(). However, when retrieving a text string from the ClipBoard, do_getscrap() does not appear to account for the presence of the null terminator, but rather, includes it as part of the text.Binder wrote:Hi again Guys,
Is there a certain place in the source code I can look to find the cause of this bug??
To recap, the problem is only happening on the windows builds, basically when copying text and then pasting, SS is adding an invisible character that some programs have a hard time dealing with. For example, I would like to use SS for a proprietary programming language were the text gets compiled. Those extra characters are a nightmare to hunt down and delete.
Thanks,
Bill.
That's easily fixed, but I lack the time and access to a Windows machine that I would need to build and test it.
Hi,
This build includes the fix Kelvin sent me:
http://www.open.ou.nl/hsp/downloads/She ... 3_2009.zip
I tested as mentioned above: with an older build I copied a file name and tried to find it with Sherlock: it failed
The newer build does find the file, so I guess that problem is solved!
However, when I copy some text from windows to mac os, I get a lot of rubbish pasted on the mac side.
Best,
Cat_7
This build includes the fix Kelvin sent me:
http://www.open.ou.nl/hsp/downloads/She ... 3_2009.zip
I tested as mentioned above: with an older build I copied a file name and tried to find it with Sherlock: it failed
The newer build does find the file, so I guess that problem is solved!
However, when I copy some text from windows to mac os, I get a lot of rubbish pasted on the mac side.
Best,
Cat_7
-
- Tinkerer
- Posts: 83
- Joined: Sat Apr 12, 2008 8:22 pm
This shows the error I get when copying a text from Simpletext in Mac OS to wordpad in Windows, edit it and copy it back to Simpletext in Mac OS.
I tried to paste the text here, but then the additional characters don't show up.
(this is on Windows Vista SP1, using my latest SheepShaver for Windows build)
Cat_7
I tried to paste the text here, but then the additional characters don't show up.
(this is on Windows Vista SP1, using my latest SheepShaver for Windows build)
Cat_7
-
- Tinkerer
- Posts: 83
- Joined: Sat Apr 12, 2008 8:22 pm