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

version» Context lines:

pike.git/lib/modules/Sql.pmod/sql_util.pmod:191:    //! The table the field is from. Not present from all databases.    //! @member string "default"    //! The default value for the column. Not available from all databases.    //! @endmapping    array(int|mapping(string:mixed)) fetch_fields()    {    if (!field_info) {    field_info = master_result->fetch_fields();    foreach(field_info, int|mapping(string:mixed) field) {    if (mappingp(field)) { -  field->name = utf8_to_string(field->name); +  field->name = utf8_to_string(field->name, 2);    if (field->table) { -  field->table = utf8_to_string(field->table); +  field->table = utf8_to_string(field->table, 2);    }    if (field->default) { -  field->default = utf8_to_string(field->default); +  field->default = utf8_to_string(field->default, 2);    }    }    }    }    return field_info;    }       //! Skip ahead the specified number of rows.    void seek(int rows)    {
pike.git/lib/modules/Sql.pmod/sql_util.pmod:220:    //! Fetch the next row from the result.    //!    //! All strings in the result are decoded from UTF8.    int|array(string) fetch_row()    {    int|array(string) row = master_result->fetch_row();    if (!arrayp(row)) return row;    array(int|mapping(string:mixed)) field_info = fetch_fields();    foreach(row; int i; string|int val) {    if (stringp(val)) { -  row[i] = utf8_to_string(val); +  row[i] = utf8_to_string(val, 2);    }    }    return row;    }       //! JSON is always utf8 default, do nothing.    int|string fetch_json_result()    {    return master_result->fetch_json_result();    }
pike.git/lib/modules/Sql.pmod/sql_util.pmod:253: Inside #if constant (___Mysql.mysql.HAVE_MYSQL_FIELD_CHARSETNR)
  {    inherit UnicodeWrapper;       int|array(string) fetch_row()    {    int|array(string) row = master_result->fetch_row();    if (!arrayp(row)) return row;    array(int|mapping(string:mixed)) field_info = fetch_fields();    foreach(row; int i; string|int val) {    if (stringp(val) && field_info[i]->charsetnr != 63) { -  row[i] = utf8_to_string(val); +  row[i] = utf8_to_string(val, 2);    }    }    return row;    }   }      #else      class MySQLBrokenUnicodeWrapper   // This one is used to get a buggy unicode support when compiled with
pike.git/lib/modules/Sql.pmod/sql_util.pmod:289:    inherit UnicodeWrapper;       int|array(string) fetch_row()    {    int|array(string) row = master_result->fetch_row();    if (!arrayp(row)) return row;    array(int|mapping(string:mixed)) field_info = fetch_fields();    foreach(row; int i; string|int val) {    if (stringp(val) && field_info[i]->flags &&    !field_info[i]->flags->binary) { -  row[i] = utf8_to_string(val); +  row[i] = utf8_to_string(val, 2);    }    }    return row;    }   }      #endif