Strange characters displaying when fetched from db

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

Strange characters displaying when fetched from db

Post by klevis miho »

When I fetch some text from the database, it displays me strange characters.
I know that I have to use utf-8 encoding.
I added:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

but this fixes only the test that doesn't come from the db.

Will accept any help
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Strange characters displaying when fetched from db

Post by requinix »

Is the stuff in the database UTF-8 too?
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

Re: Strange characters displaying when fetched from db

Post by klevis miho »

I did also in the database utf-8 general. I did it for all the table, and for just the column. It didn't worked, unless I have done it wrong. I did a workaround, replacing the strange characters with &euml;, but I don't like this approach.
Post Reply