469,643 Members | 1,514 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

Problem with euro sign (and others)

Hi,

I have a database PostgreSQL entry that includes the string €
which is the euro sign.

When I retrieve the string through a PHP SQL statement and then echo the
result to the browser, it shows the correct euro sign, but in the source
code, it still says € ...

This is a problem to me, because I generate a PDF, and in this it still
says € instead of the euro sign. I have the same behaviour with
signs like '-' and '+'

Any help is very appreciated.

Thanks,georg.
Nov 30 '07 #1
3 2959
Georg Weiler wrote:
Hi,

I have a database PostgreSQL entry that includes the string €
which is the euro sign.

When I retrieve the string through a PHP SQL statement and then echo the
result to the browser, it shows the correct euro sign, but in the source
code, it still says € ...

This is a problem to me, because I generate a PDF, and in this it still
says € instead of the euro sign. I have the same behaviour with
signs like '-' and '+'

Any help is very appreciated.

Thanks,georg.
You have to simply replace the HTML symbols with the real characters
before generating the PDF with str_replace.

--
www.lamib.info
Nov 30 '07 #2
Thanks lamib, it works.

But isn't there a ready-to-use built-in function in PHP that does this
trick?

lamib schrieb:
Georg Weiler wrote:
>Hi,

I have a database PostgreSQL entry that includes the string €
which is the euro sign.

When I retrieve the string through a PHP SQL statement and then echo
the result to the browser, it shows the correct euro sign, but in the
source code, it still says € ...

This is a problem to me, because I generate a PDF, and in this it
still says € instead of the euro sign. I have the same behaviour
with signs like '-' and '+'

Any help is very appreciated.

Thanks,georg.


You have to simply replace the HTML symbols with the real characters
before generating the PDF with str_replace.

--
www.lamib.info
Nov 30 '07 #3
This is a problem to me, because I generate a PDF, and in this it still
says € instead of the euro sign. I have the same behaviour with
signs like '-' and '+'
So you learned that output specific codes never ever belong into the
database.
Dec 1 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Marco W | last post: by
18 posts views Thread by gabriel | last post: by
8 posts views Thread by Max | last post: by
4 posts views Thread by rphil | last post: by
7 posts views Thread by kingski | last post: by
reply views Thread by kingski | last post: by
4 posts views Thread by Kim | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.