Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL language option treats \ as an escape character, when SQL does not (V7.3.3) #3187

Closed
XLZ1787 opened this issue Apr 20, 2017 · 3 comments
Closed

Comments

@XLZ1787
Copy link

XLZ1787 commented Apr 20, 2017

Description of the Issue

When using the Language plugin for SQL, the \ character causes the

Steps to Reproduce the Issue

  1. Paste the following into a new file window.
    SELECT 'X' from ATABLE
    WHERE FILESTRING = 'C:\Temp\Folder'
    AND FILENAME = 'tempfile.txt'

  2. Change the language to SQL

  3. You'll see that the \ character causes the single quote text qualifiers to reverse for the next two lines of script. This is incorrect behavior for SQL.

  4. To confirm this, delete the above script and paste in the following, noting the additional single quote
    SELECT 'X' from ATABLE
    WHERE FILESTRING = 'C:\Temp\Folder''
    AND FILENAME = 'tempfile.txt'

Expected Behavior

\ characters within text strings should behave as they do in SQL.

Actual Behavior

\ characters still act as escape characters even within SQL strings

@dail8859
Copy link
Contributor

Settings > Preferences > MISC. > Treat backslash as escape character for SQL

@XLZ1787
Copy link
Author

XLZ1787 commented Apr 20, 2017

Why is it a preference when it's in direct contravention of the script language though?

@dail8859
Copy link
Contributor

See: https://sourceforge.net/p/notepad-plus/patches/551/

Quote from the link:

Backslash is an escape character in MySQL, but not in T-SQL and PostgreSQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants