Hello World, hello Enrico,
Geany 0.13svn >= 2188 (Latest windows build), Windows XP Professional
I have a file in the editor, mode is Win (CRLF), encoding UTF-8 (no BOM). If I lookt at it in a hex editor, it is correctly saved with line endings 0x0D, 0x0A. If I mark (a part or all) the file, copy it into the clipboard and paste it into geany, it is still correct. If I paste it into another editor, the line endings look like 0x0D, 0x0D, 0x0A, e.g. 0x0D appears twice (adding an extra line in the other editor and sometimes even compiler errors if it is source code)...
Best regards Andreas
On Mon, 28 Jan 2008 11:52:47 +0100, Andreas Tscharner andy@vis.ethz.ch wrote:
Hi,
Geany 0.13svn >= 2188 (Latest windows build), Windows XP Professional
(it only happens with older versions, also with Geany 0.12)
I have a file in the editor, mode is Win (CRLF), encoding UTF-8 (no BOM). If I lookt at it in a hex editor, it is correctly saved with line endings 0x0D, 0x0A. If I mark (a part or all) the file, copy it into the clipboard and paste it into geany, it is still correct. If I paste it into another editor, the line endings look like 0x0D, 0x0D, 0x0A, e.g. 0x0D appears twice (adding an extra line in the other editor and sometimes even compiler errors if it is source code)...
Thanks for reporting. I never noticed this. Very strange problem. I'm not yet sure why this happens, probably there is something wrong with the method of copying the text into the clipboard.
Regards, Enrico
On Tue, 29 Jan 2008 18:14:01 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
If I mark (a part or all) the file, copy it into the clipboard and paste it into geany, it is still correct. If I paste it into another editor, the line endings look like 0x0D, 0x0D, 0x0A, e.g. 0x0D appears twice (adding an extra line in the other editor and sometimes even compiler errors if it is source code)...
Thanks for reporting. I never noticed this. Very strange problem. I'm not yet sure why this happens, probably there is something wrong with the method of copying the text into the clipboard.
I've seen such a character combination while using 'unix line format' with windows. The application causing the trouble doesn't know this format and (somehow) expand it into 0x0D, 0x0D, 0x0A. Maybe that's the problem.
On Wed, 30 Jan 2008 09:18:49 +0100, Joerg Desch jd.vvd@web.de wrote:
On Tue, 29 Jan 2008 18:14:01 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
If I mark (a part or all) the file, copy it into the clipboard and paste it into geany, it is still correct. If I paste it into another editor, the line endings look like 0x0D, 0x0D, 0x0A, e.g. 0x0D appears twice (adding an extra line in the other editor and sometimes even compiler errors if it is source code)...
Thanks for reporting. I never noticed this. Very strange problem. I'm not yet sure why this happens, probably there is something wrong
Now I know why it happens. The selected text is converted into LF line endings before actually copying it to the clipboard. This is done by Scintilla. Simply skipping this or explicitly converting it to CRLF would solve the problem, at least it did for me when testing with Windows Notepad. I'm not yet sure whether this is really the solution. To get some more information, I asked on the Scintilla mailing list because it also affects SciTE and other Scintilla based applications built on Windows with GTK. I'll keep you updated.
I've seen such a character combination while using 'unix line format' with windows. The application causing the trouble doesn't know this format and (somehow) expand it into 0x0D, 0x0D, 0x0A. Maybe that's the problem.
I think this is another problem, not related to Geany.
Regards, Enrico
On Thu, 31 Jan 2008 15:03:27 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 30 Jan 2008 09:18:49 +0100, Joerg Desch jd.vvd@web.de wrote:
On Tue, 29 Jan 2008 18:14:01 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
If I mark (a part or all) the file, copy it into the clipboard and paste it into geany, it is still correct. If I paste it into another editor, the line endings look like 0x0D, 0x0D, 0x0A, e.g. 0x0D appears twice (adding an extra line in the other editor and sometimes even compiler errors if it is source code)...
Thanks for reporting. I never noticed this. Very strange problem. I'm not yet sure why this happens, probably there is something wrong
Now I know why it happens. The selected text is converted into LF line endings before actually copying it to the clipboard. This is done by Scintilla. Simply skipping this or explicitly converting it to CRLF would solve the problem, at least it did for me when testing with Windows Notepad. I'm not yet sure whether this is really the solution. To get some more information, I asked on the Scintilla mailing list because it also affects SciTE and other Scintilla based applications built on Windows with GTK. I'll keep you updated.
The problem was a strange combination of Scintilla+GTK+Win32. But it should be fixed now in SVN. Thanks for reporting.
Regards, Enrico