Bug 53120 - Non-breaking space ( ) is rendered 0xA0 when copied to Kate via Clipboard (instead of 0x20)
Summary: Non-breaking space ( ) is rendered 0xA0 when copied to Kate via Clip...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-17 22:01 UTC by Rene Schmidt
Modified: 2003-11-04 15:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Schmidt 2003-01-17 22:01:08 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Debian testing/unstable Packages
OS:          Linux

Although I've found some   (non breaking space) related reports regarding KHTML I haven't found a report that matches my problem exactly. If this is old news for you, please accept my apologies.

Problem:

I copy "Das ist ein Test" from konqueror to clipboard. HTML source of this text is

"Das ist ein Test." (non breaking space between "ein" and "Test")

When I copy this to Kate, this text should be (in ASCII)
"44 61 73 20 69 73 74 20 65 69 6e 20 54 65 73 74 2e"

In fact, it looks like this:

"44 61 73 20 69 73 74 20 65 69 6e A0 54 65 73 74 2e"

There's an 0xA0 where the non breaking space should be rendered as 0x20.

It is also strange that if something else is copied to clipboard and "Das ist ein Test" is reselected and inserted into Kate, the text gets rendered _correctly_. This behavior has been reported by Maik Qualmann in a posting from today in de.comp.os.unix.apps.kde (b09lqv$m71$07$1@news.t-online.com) and I could verify.
Comment 1 Rene Schmidt 2003-01-17 22:05:13 UTC
forgot to mention this: 
 
I'm using Debian SID in conjunction with Karolina's KDE-3.1-RC6 
Comment 2 Pablo Pita Leira 2003-10-28 00:03:18 UTC
Subject: Re: Non-breaking space ( ) is rendered 0xA0 when copied to Kate via Clipboard (instead of 0x20)

I have tried using KDE CVS 20031020 Debian Packages and I can not reproduce.  

Thank you for your bug report.
This bug can not be reproduced using the current development (CVS)
version of KDE. This suggests that the bug has already been fixed.
The bug report will be closed.

Comment 3 Thiago Macieira 2003-10-28 01:24:04 UTC
By the way, Unicode U+00A0 *is* NBSP. I don't see why this would be wrong.

Closing as requested.
Comment 4 Sebastian Sauer 2003-11-04 00:54:22 UTC
Maybe to fast closed? See what I wrote about that at http://bugs.kde.org/show_bug.cgi?id=60971 ... maybe it's not khtml-only related?! As I wrote I wasn't able to reproduce it last hours. So something strange is going on there...
Comment 5 Rene Schmidt 2003-11-04 08:34:01 UTC
No, when I copy e.g. HTML-beautified PHP or Pascal code from Konqueror spaces (NBSPs also) are rendered A0. Maybe thats technically correct, but that's not what the average user expects. Also, this behaviour causes problems USING scripts copied that way, PHP 4.x and current Free Pascal cannot handle A0 in sources. One has to replace all A0 occurences with 20 via khexedit *by hand* (or at least by search-and-replace). This is a time-waster. 

I can reproduce this behaviour using 3.1.4 (Gentoo, SuSE...) and I believe to remember even 3.1.92 (KDE 3.2 Alpha, SuSE packages).

Please fix this bug... Well I would do it by myself if I could ;) but I'm relatively new to Computer Sciences (freshman!). Thanks.
Comment 6 Maksim Orlovich 2003-11-04 15:42:40 UTC
In 3.1.x, if you copy past with select-middle click it should do the conversion 0xA0 -> 0x20. The explicit copy/paste (i.e. with ctrl-c/-v or menu entries) have been fixed to do that in CVS a week or so ago.