-
Notifications
You must be signed in to change notification settings - Fork 391
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
Support Chinese parenthesis characters in MySQL #610
Comments
Are you able to provide more context? |
The formatter works as expected. This is also demonstrated in how Github syntax-highlights this code (grayed out as a comment). |
sorry, it's my fault. The correct SQL is SELECT |
The format result is correct when I use "( " instead of "(", the problem may lies here. |
There is no more context. |
So, I understand the issue is in some sort of Unicode parenthesis character. I don't know what's the role of this character in this language and how it should be treated in SQL, or how the SQL dialect you're using treats it. To simplify diagnosing the problem, could you rewrite this problematic of SQL of yours with the minimum amount of non-ascii characters. For context, you haven't mentioned which dialect of SQL are you using. Like MySQL, SQLite, etc? |
Simplified SQL: select str(str)from db This is a type of MySQL without character restrictions and the role of character "(" in Chinese is equivalent to character "(" in English. |
Thanks for the explanation @jiangyayu. I'll need to do some research into how this issue impacts (or doesn't impact) other dialects. It definitely won't be a simple thing to fix. A few additional questions, to make sure I get things right:
|
For the first question, the answer is right. If the input is Chinese "(" characters and the output turn this characters into "(" which means changed the input, so I think it's not acceptable. In Chinese, open-paren character and close-paren character should be used in pairs. The grammar is incorrect if only use one of them. |
Input data
Expected Output
Actual Output
Usage
The text was updated successfully, but these errors were encountered: