Skip to content

Commit

Permalink
feat: Add support for Hangul "\uAC00"-"\uD7A3"
Browse files Browse the repository at this point in the history
  • Loading branch information
manticore-projects committed Mar 17, 2023
1 parent 91c9503 commit 64fe908
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ TOKEN:
| <#Pc: ["‿"-"⁀","⁔","︳"-"︴","﹍"-"﹏","_"]>

// CJK Unified Ideographs block according to https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)
| <#CJK: ["\u4E00"-"\u9FFF"]>
| <#CJK: ["\uAC00"-"\uD7A3", "\u4E00"-"\u9FFF"]>

| < #SPECIAL_ESC: "\\'" > /* Allowing this will break LIKE ... ESCAPE ... */
| < #ESC: "\\" ["n","t","b","r","f","\\","\""] >
Expand Down
7 changes: 7 additions & 0 deletions src/test/java/net/sf/jsqlparser/test/UnicodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ void testCJKSetIssue1741() throws JSQLParserException {

TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
}

@Test
void testCJKSetIssue1747() throws JSQLParserException {
String sqlStr = "SELECT 가 FROM 나";
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);

}
}

0 comments on commit 64fe908

Please sign in to comment.