Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Euro sign no longer displayed OK
Old 01-26-2010, 12:19 PM Euro sign no longer displayed OK
Skilled Talker

Posts: 83
Trades: 0
Hello,

Since very recently the euro signs that are retrieved from the database are displayed as a square. Euro signs that are typed in the php page are displayed correctly. When i look at phpmyadmin, the euro sign is correctly stored in the database.

What could have changed?

thanks!

Matt
killerwhale65 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-26-2010, 04:02 PM Re: Euro sign no longer displayed OK
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
It's not related to the db.
Looks like you don't have the correct codepage specified in your site.

Are your pages displayed in utf8, latin1 (iso8859-1) or latin15 (iso8859-15) ?
As far as I know, you need either utf8 or latin15 to display the Euro sign.

phpMyAdmin displays it right, as it uses utf8 to display it's pages.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-31-2010, 08:32 AM Re: Euro sign no longer displayed OK
Skilled Talker

Posts: 83
Trades: 0
The charset is latin1. Changed to both utf8 or latin 15 with no result. But the strange thing is:
-that everything worked before
-that € signs typed directly in the php page are displayed correctly, only those fetched from the database give a square.

What is wrong?

thanks!

Matt
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Old 01-31-2010, 11:49 AM Re: Euro sign no longer displayed OK
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
What character set is the database though?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-31-2010, 02:12 PM Re: Euro sign no longer displayed OK
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Another thing that strikes me, is that PHP is not UTF-8 compatible.
More specifically, the string functions are not.

If you try to transform, replace or do something on an utf-8 string that comes from the db, you will need to use the multibyte module from php.
http://www.php.net/manual/en/ref.mbstring.php
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-11-2010, 10:25 AM Re: Euro sign no longer displayed OK
Skilled Talker

Posts: 83
Trades: 0
Quote:
Originally Posted by chrishirst View Post
What character set is the database though?
it is set to latin1_bin.
My local copy (xampp) has latin1_general_ci and works fine. I have already tried changing the specific field to latin1_general_ci but that did not help.

Thanks!

Matt
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Euro sign no longer displayed OK
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.64980 seconds with 12 queries