pike.git / lib / modules / Sql.pmod / mysql.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/mysql.pike:1:   /* -  * $Id: mysql.pike,v 1.25 2006/08/12 02:57:55 mast Exp $ +  * $Id: mysql.pike,v 1.26 2006/08/12 03:06:06 mast Exp $    *    * Glue for the Mysql-module    */      //! Implements the glue needed to access the Mysql-module from the generic   //! SQL module.      #pike __REAL_VERSION__      #if constant(Mysql.mysql)
pike.git/lib/modules/Sql.pmod/mysql.pike:40:    utf8_mode |= UTF8_UNICODE_ENCODE_MODE;    utf8_mode &= ~LATIN1_UNICODE_ENCODE_MODE;    send_charset = "utf8";    break;    default:    // Wrong charset - the mode can't be used.    utf8_mode |= LATIN1_UNICODE_ENCODE_MODE|UTF8_UNICODE_ENCODE_MODE;    send_charset = 0;    break;    } -  werror ("utf8_mode %x, send_charset %O\n", utf8_mode, send_charset); +    }      int(0..1) set_unicode_encode_mode (int enable)   //! Enables or disables unicode encode mode.   //!   //! In this mode, if the server supports UTF-8 and the connection   //! charset is @expr{latin1@} (the default) or @expr{unicode@} then   //! @[big_query] handles wide unicode queries. Enabled by default.   //!   //! Unicode encode mode works as follows: Eight bit strings are sent
pike.git/lib/modules/Sql.pmod/mysql.pike:578:    if (mixed err = \    ::big_query ("SET character_set_client=" + new_send_charset)) { \    if (new_send_charset = "utf8") \    predef::error ("The query is a wide string " \    "and the MySQL server doesn't support UTF-8: %s\n", \    describe_error (err)); \    else \    throw err; \    } \    send_charset = new_send_charset; \ -  werror ("set charset %O\n", send_charset); \ +     } \    } \    \    int|object res = ::do_query(query); \    \    if (restore_charset) { \    if (send_charset && (<"latin1", "utf8">)[charset]) \    send_charset = charset; \    else \    ::big_query ("SET character_set_client=" + restore_charset); \