English 中文(简体)
PPO 例外:KallSTATE[IMSSP]:错误发生,使用7卢比的保险和ql 保证背书,将铺设到US-2。
原标题:PDOException: SQLSTATE[IMSSP]: error occurred translating string to UCS-2, using drupal 7 at azure and sql azure backend

最近,我开始利用网络作用和库扎雷后台,建立一个关于云层的连续7个网站。 我非常高兴,直到我打上了一套砖瓦。

我有一台虚拟机器,配有Windows服务器2008 R2, IIS 7.5,服务器2008 R2,作为发展服务器,在我将其上载到云之前试图进行改动。 我在零碎数据库中还有一些额外的表格,以支持我的习惯模块应用。 除其他外,在某个时候,我需要实施一些法典,如:

$r = db_select( my_creators ,  c )
    ->fields( c )
    ->condition( my_url , $creator_url)
    ->execute()
    ->fetchAll(PDO::FETCH_ASSOC);

$creator = $r[0];

foreach ($creator as $k => $vv)
    $s.= t( @key -->> @value<br> , array( @key  => $k,  @value  => $v));

print $s;

I have cut out a lot of extra code, but this is the code having the problem, when $creator_url has a value with some special character (e.g. André_Breton). This runs perfectly on my development machine, fetching the record and displaying the data so I was very surprised when I uploaded to the cloud and got this error

PDOException: SQLSTATE[IMSSP]: An error occurred translating string for input param 7 to UCS-2: No mapping for the Unicode character exists in the target multi-byte code page. in dblog_watchdog() (line 157 ofE:sitesrootmodulesdblogdblog.module).

基础数据库是相同的,实际上,I数据-sync是用于发展ql服务器数据库的数据。 所有特性数据领域均为斜体。

我交叉核对了所有版本的IIS、php、php推广、php.ini和所有版本都是相同的。

我通过增加工作,设法开展这方面的工作。

Database::getConnection()->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_SYSTEM);

$creator_url = iconv( UTF-8 ,  UCS-2 , $creator_url);

选择之前,然后是印刷

foreach ($creator as $k => $vv) {
    $v=iconv( ISO8859-1 ,  UTF-8 , $vv);

    $s.= t( @key -->> @value<br> , array( @key  => $k,  @value  => $v));
}

Using this workaround the select goes through, the correct record is selected and displayed, but then I get several warnings

Warning: htmlspecialchars(): Invalid multibyte sequence in argument in check_plain() (line 1572 ofE:sitesrootincludesootstrap.inc). Warning: htmlspecialchars(): Invalid multibyte sequence in argument in check_plain() (line 1572 ofE:sitesrootincludesootstrap.inc).

这样做是有道理的,因为通常会中断职能,因此所有扼杀物都将是UTF-8。

几天后,我用墙对我的头部进行点击,任何帮助都将受到高度赞赏。

谢谢!

最佳回答
问题回答

暂无回答




相关问题
Session Management with Windows Authentication

In an ASP.NET web app, using Integrated Windows Authentication, is the session tied to the windows identity? In other words, if I login (using IWA) to the app, and the app stores some "stuff" in my ...

Using Elmah with Cassini

Does anyone know if I can use Elmah with Visual Studio build-in web server(aka Cassini)? I get it working easily on IIS, but using same configuration, it doesn t work with Cassini. When I requested ...

Setting hostname in IIS, include www?

I want to set the hostname for a website I m adding in IIS 7, however do I include the www in the hostname or not? because I want both www.mysite.com and mysite.com both to point to mysite on the ...

inetpub versus any other folder

I ve run websites out of inetpub, as well as from folders just residing on the C: drive. I wonder, are there any definitive advantages to running websites out of inetputwwwroot?

IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

热门标签