Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#551 Backslash is only an escape character in some SQL dialects

Next_major_release
closed
nobody
None
7
2014-05-11
2014-01-12
Andreas Jonsson
No

https://sourceforge.net/p/notepad-plus/bugs/4645/

Currently N++ always treats the backslash as an escape character in strings when displaying SQL files. This is only correct in some dialects of SQL.

Backslash is an escape character in MySQL, but not in T-SQL and PostgreSQL. (In Postgres you can write "e" in front of a string if you want it to treat backslashes as escape characters, like e'c:\\path\\').

Perhaps there could be a language profile for each SQL dialect, but the problem with that is that if the user opens a file with a .sql extension, how would you know which dialect it is?

I have instead added an option under Misc. which allows the user to choose if backslash should be treated as an escape character. I'd imagine that most users don't regularly work with different SQL databases.

Note that the patch is a modified version of the one for aligning block comments ( https://sourceforge.net/p/notepad-plus/patches/547/ ), so if you merge both you must manually change the ID for the new checkboxes in one of the patches.

1 Attachments

Discussion

  • Don HO
    Don HO
    2014-04-30

    • status: open --> accepted
    • Priority: 5 --> 7
     
  • Don HO
    Don HO
    2014-05-11

    • status: accepted --> closed