-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Hql Lexer and french accents...
PostPosted: Thu Apr 07, 2005 12:26 pm 
Newbie

Joined: Thu Apr 07, 2005 12:18 pm
Posts: 6
Location: Toulouse, France
Hello !

I think the Hql lexer doesn't accept accent...

Here is the stack trace for query "From com.atos.vigile.vigistudio.model.admin.structure.Role role WHERE role.Nom='Intégrateur'" :

(Hibernate version : 3.0.beta4)

Code:
Caused by: line 1:84: expecting ''', found 'é'
   at org.hibernate.hql.antlr.HqlBaseLexer.nextToken(HqlBaseLexer.java:278)
   at antlr.TokenBuffer.fill(TokenBuffer.java:69)
   at antlr.TokenBuffer.LA(TokenBuffer.java:80)
   at antlr.LLkParser.LA(LLkParser.java:52)
   at org.hibernate.hql.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:2919)
   at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:2784)
   at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:2665)
   at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:2691)
   at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:532)
   at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2112)
   at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:1975)
   at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:1938)
   at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:1857)
   at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:1821)
   at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:1697)
   at org.hibernate.hql.antlr.HqlBaseParser.logicalExpression(HqlBaseParser.java:1802)
   at org.hibernate.hql.antlr.HqlBaseParser.whereClause(HqlBaseParser.java:366)
   at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:683)
   at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:227)
   at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:150)
   at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:208)
   at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
   ... 90 more



An idea ???

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 12:56 pm 
Newbie

Joined: Thu Apr 07, 2005 12:18 pm
Posts: 6
Location: Toulouse, France
Well... I try to modify the grammar (hql.g) and I just changed this line in the lexer (line 635) :
Code:
charVocabulary='\u0000'..'\u007F'; // allow ascii


to this one :
Code:
charVocabulary = '\3'..'\377'; // Latin



... and it's working now :D


Can this modification be checked and added to future hibernate version ???


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 2:20 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
have you tried with hibernate 3 final release?

thanks for tracking this problem.

I open a jira issue about this

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 2:25 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
HHH-323
http://opensource.atlassian.com/project ... se/HHH-323

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 5:45 am 
Newbie

Joined: Thu Apr 07, 2005 12:18 pm
Posts: 6
Location: Toulouse, France
Sorry, this bug seems to be fixed in the final release...

charVocabulary has been extended to unicode chars...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.