title: Saving image with Japanese text
body: <p>I have installed --enable-gd-jis-conv=shared and --enable-mbstring=shared, but I still can't seem to get Japanese text saved into an image using a font file.</p>
  
  <p>If I change "英雄時代" to some english text, the image is created correctly with the english characters of the Japanese font, however with Japanese text I get weird squares and other things.</p>
  
  <pre><code>public function makeJapaneseCharacter($font="static/JFONT.TTF", $W=200, $H=20, $X=0, $Y=0, $fsize=18, $color=array(0x0,0x0,0x0), $bgcolor=array(0xFF,0xFF,0xFF))
  {        
  $this-&gt;im = @imagecreate($W, $H)
  or die("Cannot Initialize new GD image stream");
  
  $background_color = imagecolorallocate($this-&gt;im, $bgcolor[0], $bgcolor[1], $bgcolor[2]); //RGB color background.
  $text_color = imagecolorallocate($this-&gt;im, $color[0], $color[1], $color[2]);            //RGB color text.
  
  imagettftext($this-&gt;im, $fsize, $X, $Y, $fsize, $text_color, $font, mb_convert_encoding('英雄時代', 'SJIS', 'UTF-8'));
  $this-&gt;saveAsPng("jchar", "static/");
  }
  
  
  public function saveAsPng($fileName, $location= null)
  {        
  
      $_fileName = $fileName.".png";
      $_fileName = is_null($location)?$_fileName:$location.$_fileName;
      return imagepng($this-&gt;im, $_fileName);        
  }    
  </code></pre>
  
  <p>Any help would be great appreciated,
  Nicholas.</p>