pike.git
/
lib
/
modules
/
Sql.pmod
/
mysql.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/mysql.pike:302:
//! @expr{character_set_results@} if unicode decode mode isn't //! enabled. //! //! @note //! The MySQL @expr{latin1@} charset is close to Windows //! @expr{cp1252@}. The difference from ISO-8859-1 is a bunch of //! printable chars in the range @expr{0x80..0x9f@} (which contains //! control chars in ISO-8859-1). For instance, the euro currency //! sign is @expr{0x80@}. //!
-
//! You can use the @expr{mysql-latin1@} encoding in the
-
//!
@[Locale.Charset]
module to do conversions, or just use the
-
//!
special
@expr{"unicode"@} charset instead.
+
//! You can use the @expr{mysql-latin1@} encoding in the
@[Charset]
+
//! module to do conversions, or just use the
special
+
//! @expr{"unicode"@} charset instead.
//! //! @seealso //! @[get_charset], @[set_unicode_encode_mode], @[set_unicode_decode_mode] { charset = lower_case (charset); CH_DEBUG("Setting charset to %O.\n", charset); int broken_unicode = charset == "broken-unicode"; if (broken_unicode) charset = "unicode";
pike.git/lib/modules/Sql.pmod/mysql.pike:658:
CH_DEBUG ("Switching charset from %O to %O (due to charset arg).\n", \ restore_charset, charset); \ ::big_query ("SET character_set_client=" + charset); \ /* Can't be changed automatically - has side effects. /mast */ \ /* ::big_query("SET character_set_connection=" + charset); */ \ } else \ restore_charset = 0; \ } \ \ else if (send_charset) { \
-
string new_send_charset
;
\
+
string new_send_charset
=
send_charset;
\
\ if (utf8_mode & LATIN1_UNICODE_ENCODE_MODE) { \ if (String.width (query) == 8) \ new_send_charset = "latin1"; \ else { \ CH_DEBUG ("Converting (mysql-)latin1 query to utf8.\n"); \ query = utf8_encode_query (query, latin1_to_utf8); \ new_send_charset = "utf8"; \ } \ } \