如果服务器不支持iconv库可以用http://www.aditus.nu/jpgraph/index.php的jpgrap的里面的jpgraph_gb2312.php。

解决方案 »

  1.   

    正好偶也在找一篇这样的文章,但还是有错误?楼上的朋友请看:<?php
    include("jpgraph_gb2312.php"); $play = new GB2312toUTF8(); $im = imagecreatefrompng ("test.png");
    $black = imagecolorallocate($im, 0, 0, 0);

    $str = "另";
    $newStr = $play->gb2utf8($str); imagestring($im, 5, 100, 30, $newStr, $black);
    imagepng($im);
    ?>输出中文在图片上还是有乱码。
    $newStr = $play->u2utf8($str);
    也是一样,请指点一下。 谢谢
      

  2.   

    在gd2中写如中文要正常显示,必须要有中文字库,请参考:http://community.csdn.net/Expert/TopicView.asp?id=3156756
      

  3.   

    linux 中的php怎么才能支持iconv()呢?
      

  4.   

    大哥,许多人都已经谈过此问题了,查找一下"utf8"和"utf-8",一大堆的编码转换问题,我想对你一定有帮助!