Subject | Re: [firebird-support] when to use introducer syntax for charachter sets? |
---|---|
Author | Michael Ludwig |
Post date | 2012-03-02T18:26:35Z |
Marsupilami79 schrieb am 23.02.2012 um 15:17 (+0100):
http://dev.mysql.com/doc/refman/5.0/en/charset-literal.html
encoding.
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.
--
Michael Ludwig
>For literals. See here:
> I have a problem in understanding when to use the introducer syntax
> for character sets.
http://dev.mysql.com/doc/refman/5.0/en/charset-literal.html
> Helen Borrie states in the firebird booksWhat page number?
> that the introducer syntax should be used whenever a column isNot needed when you type in the characters in the proper connection
> 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'
encoding.
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 thatExactly.
> 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