Jump to content

Problem with output image with eurosign


hvdboorn

Recommended Posts

Hi,

 

I used the function imagecreatefrompng() to edit a png image. On the image should come a amount of money like €30, but the euro sign appears with the function imagestring() as a questionmark. I executed the function ini_set("default_charset","iso-8859-1"); before the text is outputted onto the image, but this doesn't work. I've tried everything like standard charset ini_set("default_charset",""); and all the iso charsets until 15. I also tried to use utf8 without any success.

 

I also tried to add the eurosign through hex notation, but then I get a literal notation on the image. example: amount: €98 where it should be €98.

 

What can I do?

Link to comment
https://forums.phpfreaks.com/topic/149856-problem-with-output-image-with-eurosign/
Share on other sites

You could use a TrueType or FreeType font that has the character in it.  The front that it uses by default probably doesn't have the euro character in it, so it shows it as a "?".

 

Here is what you should read on:

http://www.php.net/manual/en/function.imagettftext.php

http://www.php.net/manual/en/function.imagefttext.php

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.