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.