You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "dion gillard (JIRA)" <ji...@apache.org> on 2006/09/26 13:37:50 UTC

[jira] Created: (JEXL-22) Allow unicode literals to be used

Allow unicode literals to be used
---------------------------------

                 Key: JEXL-22
                 URL: http://issues.apache.org/jira/browse/JEXL-22
             Project: Commons JEXL
          Issue Type: Improvement
    Affects Versions: 1.1
            Reporter: dion gillard
            Priority: Minor
             Fix For: 1.1.1


How can I use international characters in JEXL expressions?

For example: myvar == 'Użytkownik'  (string constant contains Polish 'z'
with dot)

I get the following exception:

org.apache.commons.jexl.parser.TokenMgrError: Lexical error at line 1,
column 17.  Encountered: "\u0139" (313), after : "\'U"



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JEXL-22) Allow unicode literals to be used

Posted by "dion gillard (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JEXL-22?page=comments#action_12437803 ] 
            
dion gillard commented on JEXL-22:
----------------------------------

javacc 4 generates jdk1.4 compatible source code by default. If you
need 1.3 or 1.2 compatible input use JDK_VERSION:1.2

The generated code still seems to have a few 1.4 specific pieces in
it, such as use of  RuntimeException(Throwable).

If you want to compile Jexl against 1.2/1.3 using maven, you'll need
the following command line invocation (all on one line):

maven -Dmaven.compile.fork=yes -Dmaven.compile.executable=c:\jdk1.3.1_16\bin\javac.exe -Dbuild.compiler=modern clean test

Obviously the javac executable will probably be different on your machine.

> Allow unicode literals to be used
> ---------------------------------
>
>                 Key: JEXL-22
>                 URL: http://issues.apache.org/jira/browse/JEXL-22
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: dion gillard
>            Priority: Minor
>             Fix For: 1.1.1
>
>
> How can I use international characters in JEXL expressions?
> For example: myvar == 'U?ytkownik'  (string constant contains Polish 'z'
> with dot)
> I get the following exception:
> org.apache.commons.jexl.parser.TokenMgrError: Lexical error at line 1,
> column 17.  Encountered: "\u0139" (313), after : "\'U"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JEXL-22) Allow unicode literals to be used

Posted by "dion gillard (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JEXL-22?page=comments#action_12437808 ] 
            
dion gillard commented on JEXL-22:
----------------------------------

I've used the original report to add a test to JexlTest, have regenerated the code and tested it.

I'm doing the tedious merge/restyle of the generated code so it matches SVN and generates smaller commit messages.

> Allow unicode literals to be used
> ---------------------------------
>
>                 Key: JEXL-22
>                 URL: http://issues.apache.org/jira/browse/JEXL-22
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: dion gillard
>            Priority: Minor
>             Fix For: 1.1.1
>
>
> How can I use international characters in JEXL expressions?
> For example: myvar == 'U?ytkownik'  (string constant contains Polish 'z'
> with dot)
> I get the following exception:
> org.apache.commons.jexl.parser.TokenMgrError: Lexical error at line 1,
> column 17.  Encountered: "\u0139" (313), after : "\'U"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JEXL-22) Allow unicode literals to be used

Posted by "dion gillard (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JEXL-22?page=comments#action_12437802 ] 
            
dion gillard commented on JEXL-22:
----------------------------------

>From Randy H:

I had similar issue with the latest jexl 1.1 release. Seems the option for
unicode support is not enabled when using the parser was generated.

Here is what I did to get it work with non-ASCII code:

1. Download and unzip jexl 1.1 source from:
http://www.axint.net/apache/jakarta/commons/jexl/source/commons-jexl-1.1-src.zip

2. Download and unzip JavaCC 4.0 from:
https://javacc.dev.java.net/files/documents/17/26777/javacc-4.0.zip

3. Run javacc-4.0\bin\javacc -UNICODE_INPUT
commons-jexl-1.1-src\src\java\org\apache\commons\jexl\parser\Parser.jj

4. Copy *.java to
commons-jexl-1.1-src\src\java\org\apache\commons\jexl\parser

5. Run ant -f commons-jexl-1.1-src\build.xml

6. Use the new jar commons-jexl-1.1-src\target\commons-jexl-1.1.jar

7. Profilt! :)


> Allow unicode literals to be used
> ---------------------------------
>
>                 Key: JEXL-22
>                 URL: http://issues.apache.org/jira/browse/JEXL-22
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: dion gillard
>            Priority: Minor
>             Fix For: 1.1.1
>
>
> How can I use international characters in JEXL expressions?
> For example: myvar == 'U?ytkownik'  (string constant contains Polish 'z'
> with dot)
> I get the following exception:
> org.apache.commons.jexl.parser.TokenMgrError: Lexical error at line 1,
> column 17.  Encountered: "\u0139" (313), after : "\'U"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Resolved: (JEXL-22) Allow unicode literals to be used

Posted by "dion gillard (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JEXL-22?page=all ]

dion gillard resolved JEXL-22.
------------------------------

    Resolution: Fixed

Code regenerated, test added.
Committed to svn on 2006-09-26

> Allow unicode literals to be used
> ---------------------------------
>
>                 Key: JEXL-22
>                 URL: http://issues.apache.org/jira/browse/JEXL-22
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: dion gillard
>            Priority: Minor
>             Fix For: 1.1.1
>
>
> How can I use international characters in JEXL expressions?
> For example: myvar == 'U?ytkownik'  (string constant contains Polish 'z'
> with dot)
> I get the following exception:
> org.apache.commons.jexl.parser.TokenMgrError: Lexical error at line 1,
> column 17.  Encountered: "\u0139" (313), after : "\'U"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org