Ok, so there seems to be some character encoding issues.

I'm not very experienced in PostgreSQL, so I don't think I can help with this :(

One thing I do notice is that the message says UTF8, and your saying UTF16. 
Those are 2 different encodings. So figure out which character set is actually 
used in the database, and use that in the client/connection as well.

PS: To be clear, these problems have nothing to do with DQL functions perse, 
once you've fixed the character encoding issues, the functions should work fine.

--  
Jasper N. Brouwer
(@jaspernbrouwer)


On 26 May 2014 at 15:42:18, Gianvito Pio ([email protected]) wrote:
> No..it didn't solve.
> As I said before, when I use special characters (for example 'è'), I
> just get this error:
> SQLSTATE[22021]: Character not in repertoire: 7 ERROR: invalid byte
> sequence for encoding "UTF8": 0xe3 0xa8 0x20
>  
> It seems to be related to the client encoding.
> It is set to UTF-8 everywhere...
>  
> The interesting thing is that in PGADMIN, it works...and the statement
> SHOW CLIENT_ENCODING in PGAdmin returns me UNICODE.
> It is noteworthy that I'm working on Windows, which actually manages
> UNICODE in UTF-16.
> I don't know if this can help ...
>  
> Il 26/05/2014 15.33, 'Jasper N. Brouwer' via doctrine-user ha scritto:
> > Can you try this?
> >
> > $parser->match(Lexer::T_IDENTIFIER);
> > $parser->match(Lexer::T_OPEN_PARENTHESIS);
> > $this->field = $parser->StringExpression(); // <--
> > $parser->match(Lexer::T_COMMA);
> > $this->value = $parser->StringPrimary();
> > $parser->match(Lexer::T_CLOSE_PARENTHESIS);
> >
> > If this doesn't work, can you explain _what_ isn't working?
> > Not getting the expected result? Then what did you expect, and what was the 
> > actual result?  
> > Getting an error message? What is the message?
> >
> > --
> > Jasper N. Brouwer
> > (@jaspernbrouwer)
> >
> >
> > On 26 May 2014 at 14:51:11, Gianvito Pio ([email protected]) wrote:
> >> It actually seems that I have this problem with all the Doctrine
> >> functions... LOWER was just one...and ILIKE has the same problem.
> >> I implemented both LIKE and ILIKE through a custom function and now also
> >> LIKE does not work.
> >>
> >> Here is the code:
> >>
> >> class Ilike extends FunctionNode {
> >>
> >> protected $field;
> >> protected $value;
> >>
> >> public function parse(\Doctrine\ORM\Query\Parser $parser)
> >> {
> >> $parser->match(Lexer::T_IDENTIFIER);
> >> $parser->match(Lexer::T_OPEN_PARENTHESIS);
> >> $this->field = $parser->StringPrimary();
> >> $parser->match(Lexer::T_COMMA);
> >> $this->value = $parser->StringPrimary();
> >> $parser->match(Lexer::T_CLOSE_PARENTHESIS);
> >> }
> >>
> >> public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
> >> {
> >> return $this->field->dispatch($sqlWalker) . ' ILIKE ' .
> >> $this->value->dispatch($sqlWalker);
> >> }
> >> }
> >>
> >> Do you see something strange that can cause the problem?
> >>
> >> Thank you
> >
>  
> --
> You received this message because you are subscribed to the Google Groups 
> "doctrine-user"  
> group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].  
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to