Jump to content

(Archived) evernote reformatting text from MSSQL


bulgar4e

Recommended Posts

I am a developer, and have been trying evernote to hold various pieces of code. Recently I noticed that if I paste SQL queries from SQL Server Management Studio, they are slightly altered in evernote. For example, my query may have the following '[sOME_SERVER].A_Database.dbo.MyTable' which evernote produces as '[sOME_SERVER] .A_Database . dbo. MyTable' (note the spaces which have been added). I have not experienced this with any other program, as far as I know. If I paste the same text into another program like notepad or notepad++, I don't have this problem. Oddly, if I take the same text from my text editor, copy again, and paste to evernote, it does not add the spaces.

I am not sure which program is causing this behavior but am curious as to whether this kind of reformatting has been documented in evernote before.

Link to comment

I'm a SQL Server DBA, too. I have noticed the same thing. It seems to put spaces around the dots when you are pasting into Evernote. If you use CTRL+SHIFT+V past (no formatting) it won't do that, but you lose the syntax highlighting.

Link to comment
  • Level 5*

Why would you want to use Evernote as a code snippet tool when there are so many great apps dedicated to managing code snippets that provide a lot features (like version mgt) that is not available in Evernote?

Evernote is a great tool for general purpose note taking. However, it is not a good word processor, spreadsheet, image editor, or code snippet manager.

Link to comment

Why would you want to use Evernote as a code snippet tool when there are so many great apps dedicated to managing code snippets that provide a lot features (like version mgt) that is not available in Evernote?

Because when you're writing notes about the development process or describing an algorithm it's useful to include snippets of the code in question. I'm sure the OP isn't suggesting using EN as an alternative to revision control, that would be insane.

Anyway, as for the original problem, SSMS offers text in RTF format in order to preserve the syntax highlighting; EN is interpreting it incorrectly and adding the spaces when it's pasted. It also ***** up the background colour for spaces if you happen to have something other than white (strictly, something other than the EN page colour) as the background colour in the SSMS SQL editor.

Here's a simple statement from SSMS:

SELECT * FROM db.table WHERE status='Locked'

The RTF for this as generated by SSMS is as so (I've truncated all the preamble just to show what's around the statement text itself):

SELECT\cf3 \cf4 *\cf3 \cf1 FROM\cf3 db\cf4 .\cf1 table\cf3 \cf1 WHERE\cf3 Status\cf4 =\cf5 'Locked'

The RTF tags are using a space as the delimiter. EN is mis-interpreting these as real spaces when it translates to HTML internally.

Link to comment
  • 5 months later...
  • 3 months later...

+1 (I've got the same issue)

 

I think it *may* a common issue with .NET applications and RichText formating??  I also use Teradata SQL Assistant as well as MSSQL; both do code formatting which is messed up when clipping the SQL into EverNote.

 

Spaces appear before periods between tablenames & columns when you paste into EverNote.

 

It really causes issues trying to leverage EverNote as a snippet repository.  There's a reason almost all modern SQL & coding tools use syntax highlighting - because it make code MUCH easier to decipher quickly.

 

 

PLEASE fix this annoying copy/paste issue!

Link to comment
  • 2 months later...

I'm working on Mac, using RDC to connect to a windows server 2008R2 box and working in SQL server management studio. If I copy from the query window, and paste into Evernote, Evernote crashes every time. I guess it is the same issue, and has something to do with the extra formatting / code highlighting in the query window.

 

Pasting into TextMate or similar and then copying again and pasting into Evernote works just fine.

 

A fix would be great - it is very useful to have the queries directly in the note describing e.g. the data import procedure..

Link to comment
  • Level 5*

Issues with spacing have surfaced in the past (http://discussion.evernote.com/topic/37969-android-pushing-words-together/), but I don't think anyone has ever provided us this level of detail. Thank you!

I've also noticed that I get a mix of non-breaking apaces and general purpose ones. I don't think this has caused me any problems, but I am pretty sure it is a departure from the plain text origins of my work. Please do start a support ticket (see my signature), post the ticket number here, and let us know what tech support says.

Link to comment

Some further info:

 

- I have sent back the crash report with a short description

- Copying from the window into mail.app does not work either - nothing happens when I paste

- Pasting into TextEdit or TextMate works, from where you can copy to Evernote

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...