For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > November 2004 > Cannot render EURO symbol when using imagettftext









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Cannot render EURO symbol when using imagettftext
Big Frank

2004-11-18, 3:56 pm

Hi all,

I have been wrestling with this one for three hours and cannot find a
solution. I am writing text to an image from an input field. No problem
until I try to render a € (EURO symbol). Then the script will only
ever draw an unfilled rectangle instead of the required currency symbol. The
font I am using (Arial Black) has the EURO symbol so that's not the problem.
My browser is IE on Win2k set to en-uk and the page that's writing the
script includes:

<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">

I've also added:

$string = mb_convert_encoding($string, "utf-8");

to the script that's writing to the image (don't get hung up on the charset
in my examples, I have tried loads!).

I thought a user comment at http://www.php.net/mb_convert_encoding had the
answer, but it didn't help (or I missed the significance). I have changed
charsets around in the meta tag, in the mb_convert, everywhere just
to try to get imagettftext to render a Euro symbol instead of the "character
does not exist in my set" symbol, but I cannot achieve it. This is
infuriating - can anybody help me or at least point me to the correct
article?

Can somebody post this to comp.lang.php please? My ISP does not carry that
ng for some crazy reason.

Yours most humbly

Frank



Andy Hassall

2004-11-18, 8:56 pm

On Thu, 18 Nov 2004 18:38:09 +0100, "Big Frank"
<frank@wognum.removethisbit.org> wrote:

>I have been wrestling with this one for three hours and cannot find a
>solution. I am writing text to an image from an input field. No problem
>until I try to render a € (EURO symbol).


Have you seen my reply to your other similar post on this issue?


http://groups.google.com/groups?saf...om%3E&lr=&hl=en

€ is not a Euro symbol.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Hilarion

2004-11-19, 3:56 pm

Hi

Have you tried it without user input? I mean rendering the text given
explicitly in PHP script. If it works, then the problem is in retrieving
user data (try displaing it first), or recoding user data, if it does not
work, then you are specifying wrong input or using wrong font.
I've never used graphics manipulation functions in PHP, so I can't
help you more now (when I have some time i'll do some test on our
servers).

Hilarion



Big Frank

2004-11-19, 3:56 pm


"Hilarion" <hilarion@SPAM.op.SMIECI.pl> wrote in message
news:cnku6u$vn$1@nemesis.news.tpi.pl...
> Hi
>
> Have you tried it without user input? I mean rendering the text given
> explicitly in PHP script. If it works, then the problem is in retrieving
> user data (try displaing it first), or recoding user data, if it does not
> work, then you are specifying wrong input or using wrong font.
> I've never used graphics manipulation functions in PHP, so I can't
> help you more now (when I have some time i'll do some test on our
> servers).


Yes, I have tried it direct from the url (e.g. typing
www.foo.com/imagetext.php?text=€ or www.foo.com/imagetext.php?text=%80). It
makes no difference - always get a rectangle.

Any further help you, or anybody else, could give would be most appreciated.

By the way, my ISP does not carry comp.lang.php - if it's not too much
trouble could you post this question there for me?

Regards

Frank


Big Frank

2004-11-20, 8:55 am

By the way - I should add that I am DEFINITELY using a font (Arial) that
includes the EURO symbol.

Thank

Frank

"Big Frank" <francois@duffortENLEVE.org> wrote in message
news:cnlh3s$gno$1@aphrodite.grec.isp.9tel.net...
>
> "Hilarion" <hilarion@SPAM.op.SMIECI.pl> wrote in message
> news:cnku6u$vn$1@nemesis.news.tpi.pl...
not[color=darkred]
>
> Yes, I have tried it direct from the url (e.g. typing
> www.foo.com/imagetext.php?text=€ or www.foo.com/imagetext.php?text=%80).

It
> makes no difference - always get a rectangle.
>
> Any further help you, or anybody else, could give would be most

appreciated.
>
> By the way, my ISP does not carry comp.lang.php - if it's not too much
> trouble could you post this question there for me?
>
> Regards
>
> Frank
>
>



Andy Hassall

2004-11-20, 3:55 pm

On Sat, 20 Nov 2004 11:08:28 +0100, "Big Frank" <francois@duffortENLEVE.org>
wrote:

>By the way - I should add that I am DEFINITELY using a font (Arial) that
>includes the EURO symbol.


Frank, can you not see my posts or something?

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Big Frank

2004-11-20, 3:55 pm


"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:6ehup0t4u3vosi1nuvh1hirfclgbllq2s0@
4ax.com...
> On Sat, 20 Nov 2004 11:08:28 +0100, "Big Frank"

<francois@duffortENLEVE.org>
> wrote:
>
>
> Frank, can you not see my posts or something?


Hi Andy

No, this last post of yours is the first I have seen :(

I assume you hed some light on my problem but, if so, I have not seen it.

Regards

Frank


Andy Hassall

2004-11-20, 3:55 pm

On Sat, 20 Nov 2004 15:46:04 +0100, "Big Frank" <francois@duffortENLEVE.org>
wrote:

>"Andy Hassall" <andy@andyh.co.uk> wrote in message
> news:6ehup0t4u3vosi1nuvh1hirfclgbllq2s0@
4ax.com...
><francois@duffortENLEVE.org>
>
>No, this last post of yours is the first I have seen :(
>
>I assume you hed some light on my problem but, if so, I have not seen it.


Ah ha - yes I've been answering your posts on this issue a few times, the main
reply being here:

http://groups.google.com/groups? as...b2ed@4ax.com%3E

Hopefully you'll see it this time!

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Big Frank

2004-11-20, 8:55 pm

"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:vfmup0htpala3fe5ke3kn9tbb25ffu6je2@
4ax.com...

>

http://groups.google.com/groups? as...b2ed@4ax.com%3E
>
> Hopefully you'll see it this time!


Sure did, and of course it now works!

Many thanks :)

Frank


Hilarion

2004-11-23, 3:56 am

Hi

Have you tried it without user input? I mean rendering the text given
explicitly in PHP script. If it works, then the problem is in retrieving
user data (try displaing it first), or recoding user data, if it does not
work, then you are specifying wrong input or using wrong font.
I've never used graphics manipulation functions in PHP, so I can't
help you more now (when I have some time i'll do some test on our
servers).

Hilarion



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com