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

Unicode Proerty is not supported #13

Open
narusas opened this issue Aug 3, 2015 · 1 comment
Open

Unicode Proerty is not supported #13

narusas opened this issue Aug 3, 2015 · 1 comment

Comments

@narusas
Copy link

narusas commented Aug 3, 2015

I wrote unicode test case

public class InExpressionUnicodeTest extends TestCase {

public void test_String_In()
        throws Exception
{
    OgnlContext context = (OgnlContext) Ognl.createDefaultContext(null);
    Object node = Ognl.parseExpression("#이름 in {\"홍길동\", \"둘리\", \"Africa\", \"Rome\"}");
    Object root = null;

    context.put("이름", "홍길동");
    assertEquals(Boolean.TRUE, Ognl.getValue(node, context, root));
  }

}

OGNL throw Exception
ognl.ExpressionSyntaxException: Malformed OGNL expression: #이름 in {"홍길동", "둘리", "Africa", "Rome"} [ognl.TokenMgrError: Lexical error at line 1, column 2. Encountered: "\uc774" (51060), after : ""]

I debugging codes, and I modify OgnlParserTokenManager.java

Modify line 786
else if (curChar < 128) -> else

Delete line 853-875

after that modification, almost every test case success include my unicode test.

I guess, OgnlParserTokenManager work well with only ascii ( < 128)

(I modify OgnlParserTokenManager.java it self, because I don't know how to use JavaCC. (I don't know how to fix ognl.jj ognl.jjt)

@lukaszlenart
Copy link
Collaborator

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