尝试使用 Twitter 搜索 API。当我在转发的推文上打电话给utf8_decode
时,我得到语音标记/引号显示为问号......
法典:
$output .= '
<div class="leftcoltweet">
<div class="timg">
<a href="' . $account . '" target="_blank"><img src="' . $image .'"></a>
</div>
<div class="ttweet">
' . utf8_decode($tweet) . '
</div>
<div class="clr"></div>
<div class="ttime">' . $time . '</div>
<div class="clr"></div>
</div>
';
输出:
RT @IVAOAERO: ?@FilipJonckers: We are aware of and working on a fix for the ATIS issue introduced after last nights network upgrade http://t.co/6FODzr0Y?
所有其他符号显示正确。
我必须设置要使用的语言吗?如果您想知道我所做的原子查询或其他任何事情,请告诉我。
请注意,utf8_decode()
仅适用于iso-8859-1(拉丁语)编码的字符串。如果您知道字符串的字符集,则可以调用:
echo iconv("THE_CHARSET","utf8",$tweet);