Re: Can use tranditional-Chinese in where condition of OQL?

2004-01-08 Thread Thomas Dudziak
Thomas updated the grammar in CVS to antlr 2.7.2 and unicode, so please
grab OJB from CVS, and try your query again.

Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can use tranditional-Chinese in where condition of OQL?

2004-01-07 Thread 蔡博至
Hi Thomas!
I used \" instead of ', too. But it doesn't still work.
I see another's reply,but I don't know how to do clear.
Thanks for your relpy.
- Original Message - 
From: "Thomas Mahler" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 07, 2004 6:39 PM
Subject: Re: Can use tranditional-Chinese in where condition of OQL?


> Hi 蔡博至!
>
> I guess you should use \" instead of ':
> select allproducts from org.apache.ojb.tutorial2.Product where name ="小黑
"
>
> The Lexer does not complain about the chinese characters but about the
> missing \" !
>
> hope that help!
> Thomas
>
> 蔡博至 wrote:
> > Hi!
> > Does anyone use  tranditional-Chinese(non English) in where
condition of oql, and query object successfully?
> > I try to do this,but I get a error message. As :
> >
> > [0] List all product entries
> > [1] Enter a new product
> > [2] Edit a product entry
> > [3] Delete a product entry
> > [4] Quit Application
> > type in number to select a use case
> > 0
> > The list of available products:
> > OQL = select allproducts from org.apache.ojb.tutorial2.Product where
name ='小黑'
> > antlr.TokenStreamRecognitionException: expecting ''', found '小'
> > at org.apache.ojb.odmg.oql.OQLLexer.nextToken(OQLLexer.java:270)
> > at antlr.TokenBuffer.fill(TokenBuffer.java:61)
> > at antlr.TokenBuffer.LA(TokenBuffer.java:70)
> > at antlr.LLkParser.LA(LLkParser.java:50)
> > at
org.apache.ojb.odmg.oql.OQLParser.equalityExpr(OQLParser.java:673)
> > at
org.apache.ojb.odmg.oql.OQLParser.quantifierExpr(OQLParser.java:631)
> > at org.apache.ojb.odmg.oql.OQLParser.andExpr(OQLParser.java:579)
> > at org.apache.ojb.odmg.oql.OQLParser.orExpr(OQLParser.java:460)
> > at
org.apache.ojb.odmg.oql.OQLParser.whereClause(OQLParser.java:322)
> > at
org.apache.ojb.odmg.oql.OQLParser.selectQuery(OQLParser.java:130)
> > at
org.apache.ojb.odmg.oql.OQLParser.buildQuery(OQLParser.java:77)
> > at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:236)
> > at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
> > at
org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
> > at
org.apache.ojb.tutorial2.Application.run(Application.java:109)
> > at
org.apache.ojb.tutorial2.Application.main(Application.java:75)
> > org.odmg.QueryInvalidException: expecting ''', found '小'
> > at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:250)
> > at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
> > at
org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
> > at
org.apache.ojb.tutorial2.Application.run(Application.java:109)
> > at
org.apache.ojb.tutorial2.Application.main(Application.java:75)
> >
> > Who can help me? Thanks you.
> >
Dogie Tsai
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can use tranditional-Chinese in where condition of OQL?

2004-01-07 Thread Thomas Dudziak
On Wed, 7 Jan 2004, Olmanson, Alan wrote:

> Hello,
> 
> Yes, however it required patching OJB and moving to a newer version of
> antlr. I suggested a fix back in May put nothing appears to have been done
> with it.

You're right, in antlr 2.7.2 the bitset handling was significantly
improved especially for unicode. I can check an update to 2.7.2 (or
even 2.7.3rc1).

Tom



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can use tranditional-Chinese in where condition of OQL?

2004-01-07 Thread Olmanson, Alan
Hello,

Yes, however it required patching OJB and moving to a newer version of
antlr. I suggested a fix back in May put nothing appears to have been done
with it.


> Hello,
>
> I found the problem.
>
> In the oql-ojb.g grammar file, the charVocabulary is not encluding all of
> unicode it should be:
>
> charVocabulary = '\u' .. '\uFFFE';
>
> However with antlr 2.7.1 this will cause a problem with class being to
big.
> However this problem is fixed with antlr 2.7.2.


Alan



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 2:14 AM
To: OJB Users List
Subject: Can use tranditional-Chinese in where condition of OQL? 


Hi!
Does anyone use  tranditional-Chinese(non English) in where
condition of oql, and query object successfully?
I try to do this,but I get a error message. As :

[0] List all product entries
[1] Enter a new product
[2] Edit a product entry
[3] Delete a product entry
[4] Quit Application
type in number to select a use case
0
The list of available products:
OQL = select allproducts from org.apache.ojb.tutorial2.Product where name ='
小黑'
antlr.TokenStreamRecognitionException: expecting ''', found '小'
at org.apache.ojb.odmg.oql.OQLLexer.nextToken(OQLLexer.java:270)
at antlr.TokenBuffer.fill(TokenBuffer.java:61)
at antlr.TokenBuffer.LA(TokenBuffer.java:70)
at antlr.LLkParser.LA(LLkParser.java:50)
at
org.apache.ojb.odmg.oql.OQLParser.equalityExpr(OQLParser.java:673)
at
org.apache.ojb.odmg.oql.OQLParser.quantifierExpr(OQLParser.java:631)
at org.apache.ojb.odmg.oql.OQLParser.andExpr(OQLParser.java:579)
at org.apache.ojb.odmg.oql.OQLParser.orExpr(OQLParser.java:460)
at org.apache.ojb.odmg.oql.OQLParser.whereClause(OQLParser.java:322)
at org.apache.ojb.odmg.oql.OQLParser.selectQuery(OQLParser.java:130)
at org.apache.ojb.odmg.oql.OQLParser.buildQuery(OQLParser.java:77)
at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:236)
at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
at
org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
at org.apache.ojb.tutorial2.Application.run(Application.java:109)
at org.apache.ojb.tutorial2.Application.main(Application.java:75)
org.odmg.QueryInvalidException: expecting ''', found '小'
at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:250)
at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
at
org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
at org.apache.ojb.tutorial2.Application.run(Application.java:109)
at org.apache.ojb.tutorial2.Application.main(Application.java:75)

Who can help me? Thanks you.
 
Dogie Tsai

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can use tranditional-Chinese in where condition of OQL?

2004-01-07 Thread Thomas Mahler
Hi 蔡博至!

I guess you should use \" instead of ':
select allproducts from org.apache.ojb.tutorial2.Product where name ="小黑"

The Lexer does not complain about the chinese characters but about the
missing \" !

hope that help!
Thomas

蔡博至 wrote:
> Hi!
> Does anyone use  tranditional-Chinese(non English) in where condition of 
> oql, and query object successfully?
> I try to do this,but I get a error message. As :
> 
> [0] List all product entries
> [1] Enter a new product
> [2] Edit a product entry
> [3] Delete a product entry
> [4] Quit Application
> type in number to select a use case
> 0
> The list of available products:
> OQL = select allproducts from org.apache.ojb.tutorial2.Product where name ='小黑'
> antlr.TokenStreamRecognitionException: expecting ''', found '小'
> at org.apache.ojb.odmg.oql.OQLLexer.nextToken(OQLLexer.java:270)
> at antlr.TokenBuffer.fill(TokenBuffer.java:61)
> at antlr.TokenBuffer.LA(TokenBuffer.java:70)
> at antlr.LLkParser.LA(LLkParser.java:50)
> at org.apache.ojb.odmg.oql.OQLParser.equalityExpr(OQLParser.java:673)
> at org.apache.ojb.odmg.oql.OQLParser.quantifierExpr(OQLParser.java:631)
> at org.apache.ojb.odmg.oql.OQLParser.andExpr(OQLParser.java:579)
> at org.apache.ojb.odmg.oql.OQLParser.orExpr(OQLParser.java:460)
> at org.apache.ojb.odmg.oql.OQLParser.whereClause(OQLParser.java:322)
> at org.apache.ojb.odmg.oql.OQLParser.selectQuery(OQLParser.java:130)
> at org.apache.ojb.odmg.oql.OQLParser.buildQuery(OQLParser.java:77)
> at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:236)
> at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
> at 
> org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
> at org.apache.ojb.tutorial2.Application.run(Application.java:109)
> at org.apache.ojb.tutorial2.Application.main(Application.java:75)
> org.odmg.QueryInvalidException: expecting ''', found '小'
> at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:250)
> at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
> at 
> org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
> at org.apache.ojb.tutorial2.Application.run(Application.java:109)
> at org.apache.ojb.tutorial2.Application.main(Application.java:75)
> 
> Who can help me? Thanks you.
> Dogie 
> Tsai


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can use tranditional-Chinese in where condition of OQL?

2004-01-07 Thread 蔡博至
Hi!
Does anyone use  tranditional-Chinese(non English) in where condition of oql, 
and query object successfully?
I try to do this,but I get a error message. As :

[0] List all product entries
[1] Enter a new product
[2] Edit a product entry
[3] Delete a product entry
[4] Quit Application
type in number to select a use case
0
The list of available products:
OQL = select allproducts from org.apache.ojb.tutorial2.Product where name ='小黑'
antlr.TokenStreamRecognitionException: expecting ''', found '小'
at org.apache.ojb.odmg.oql.OQLLexer.nextToken(OQLLexer.java:270)
at antlr.TokenBuffer.fill(TokenBuffer.java:61)
at antlr.TokenBuffer.LA(TokenBuffer.java:70)
at antlr.LLkParser.LA(LLkParser.java:50)
at org.apache.ojb.odmg.oql.OQLParser.equalityExpr(OQLParser.java:673)
at org.apache.ojb.odmg.oql.OQLParser.quantifierExpr(OQLParser.java:631)
at org.apache.ojb.odmg.oql.OQLParser.andExpr(OQLParser.java:579)
at org.apache.ojb.odmg.oql.OQLParser.orExpr(OQLParser.java:460)
at org.apache.ojb.odmg.oql.OQLParser.whereClause(OQLParser.java:322)
at org.apache.ojb.odmg.oql.OQLParser.selectQuery(OQLParser.java:130)
at org.apache.ojb.odmg.oql.OQLParser.buildQuery(OQLParser.java:77)
at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:236)
at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
at org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
at org.apache.ojb.tutorial2.Application.run(Application.java:109)
at org.apache.ojb.tutorial2.Application.main(Application.java:75)
org.odmg.QueryInvalidException: expecting ''', found '小'
at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:250)
at org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
at org.apache.ojb.tutorial2.UCListAllProducts.apply(UCListAllProducts.java:42)
at org.apache.ojb.tutorial2.Application.run(Application.java:109)
at org.apache.ojb.tutorial2.Application.main(Application.java:75)

Who can help me? Thanks you.
Dogie Tsai