I've researched and there are solutions to special characters when dealing with dynamic queries; however, I have yet to come across solutions dealing with both sql and a gui.
Code as follows:
cur.execute("CREATE TABLE IF NOT EXISTS " + entry.get() + " (table values and columns)")
So apparently the above code works with normal entries, but with special characters such as hyphen('-') and whitespace( ), the code will not execute.
entry.get() refers to the a declared entry widget from the python's tkinter module.
Any ideas on how to get around this? Thanks.
I believe the problem can be avoided by converting all strings to unicode.
You can use as below code for unicode conversion