Subject Re: [firebird-support] when to use introducer syntax for charachter sets?
Author Michael Ludwig
Marsupilami79 schrieb am 23.02.2012 um 15:17 (+0100):
> I have a problem in understanding when to use the introducer syntax
> for character sets.

For literals. See here:

> Helen Borrie states in the firebird books

What page number?

> that the introducer syntax should be used whenever a column is
> searched and the connection character set is different from the
> character set of that column:
> So in case I have a WIN1252 client connection and the database uses
> UTF8, should I really always use something like
> where name = _WIN1252 'Jörg'

Not needed when you type in the characters in the proper connection

But suppose in your connection you're going to execute a SQL script
which happens to be encoded in UTF-8. In order not to depend on the
connection encoding du jour, you'd play safe and use introducers in
your script.

> Why should I do that? Normally I would expect firebird to know that
> everything is WIN1252, as this is the connection character set, and
> do the necessary conversions without any further hints?
> Or should I use the introducer syntax only when I want to send some
> bytes that are explicitly to be treated in a different way than the
> connection character set?
> for example something like
> where name = _UTF8 'Jörg'
> when I have the 'Jörg' in an UTF8 encoded way?


Michael Ludwig