/** * Decodes national (unicode) character data coming out of MSSQL into UTF-8 * * @param array $row The row from the database * @return array The fixed row */ private function decodeMSSQLNationalColumns($row) { if (strpos($this->sql, 'fmssqln__') === FALSE) { return $row; } $columns = array_keys($row); foreach ($columns as $column) { if (substr($column, 0, 9) != 'fmssqln__') { continue; } $real_column = substr($column, 9); $row[$real_column] = iconv('ucs-2le', 'utf-8', $this->database->unescape('blob', $row[$column])); unset($row[$column]); } return $row; }