开发者

How to printing text on image in PHP for characters beyond ascii 127?

I am using the PHP GD library API - imaget开发者_高级运维tftext, to print texts on images. I am trying to print the left and right double quotes (i.e. ones with HTML entities “ and ”) on it. As per the documentation I print the text '“' for .

On my local system it works, but not on my production server. On server I am running:-

PHP 5.3.7 (cli) (built: Aug 18 2011 19:02:25)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies


Seeme like an obvious character set issue. Checkout http://www.php.net/manual/en/intro.iconv.php for more info, but i would assume your issue would be resolved by changing your iconv.internal_encoding to something that supports your characters.

iconv_set_encoding("internal_encoding", "UTF-8");

I'd give that a shot ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜