pike.git/
lib/
modules/
Sql.pmod/
mysql.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2014-12-04
2014-12-04 19:23:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>
2a5c864998dad6c34c798d76e584b6ca25be0fdf (
10
lines) (+
7
/-
3
)
[
Show
|
Annotate
]
Branch:
bill/master_archive_support
Sql.mysql: Avoid automatic downgrading from utf8 to iso-8859-1.
678:
} \ \ else { /* utf8_mode & UTF8_UNICODE_ENCODE_MODE */ \
-
if
(_can_
send_
as_latin1
(query))
\
-
new_send_
charset
=
"latin1";
\
-
else
{
\
+
/*
NB: The
send_
charset
may
only
be
upgraded
from
\
+
*
"latin1"
to
"utf8",
not
the
other way around.
\
+
*
This is to avoid extraneous
charset
changes
\
+
*
where
the
charset
is
changed
from
query
to
query.
\
+
*/
\
+
if ((send_charset == "utf8") || !_can_send_as_latin1(query)) { \
CH_DEBUG ("Converting query to utf8.\n"); \ query = utf8_encode_query (query, string_to_utf8); \ new_send_charset = "utf8"; \