Page 1 of 1
Problem with "ë" letter in the table
Posted: Mon Mar 23, 2009 6:04 pm
by MicroBoy
My language has a letter tha is ë, and in the table it shows like a symbol. But just at the date not at other columns. When I go to phpMyAdmin everything it's ok with the date, the letter ë is there. Look these 2 photos:
p.s. I don't know why in database at the Emri and Lajmi the letter ë is A<, Now I saw for the first time, but that's not a problem for me because in the webpage is ë.
Re: Problem with "ë" letter in the table
Posted: Tue Mar 24, 2009 5:48 am
by sujithtomy
Hello,
Are you using
UTF-8 Char set ??
Regards,
Sujith
Re: Problem with "ë" letter in the table
Posted: Tue Mar 24, 2009 8:18 am
by MicroBoy
sujithtomy wrote:Hello,
Are you using
UTF-8 Char set ??
Regards,
Sujith
Where do you mean to use it, in database or in .php file?
Re: Problem with "ë" letter in the table
Posted: Tue Mar 24, 2009 11:17 am
by panic!
In the database. With PHPMyAdmin looks like thats what you're using.
Re: Problem with "ë" letter in the table
Posted: Tue Mar 24, 2009 11:21 am
by William
You need to make sure that the database is using UTF-8 charset, you're sending headers that your website is using UTF-8 and you make sure that all incoming input into the database is UTF-8. I'm guessing that somewhere something inserted the data wrong in your database.
Re: Problem with "ë" letter in the table
Posted: Tue Mar 24, 2009 12:44 pm
by MicroBoy
In phpmyadmin I made "Collation: utf8_bin" again it's the same thing. William i'm thinking like you, meaby the problem is that the date is written into database by this function:
Code: Select all
setlocale(LC_ALL, 'albanian');
$time = strftime("%A %d %B %Y, %H:%M");
Emri and lajmi are always written by the user, they aren't added automatically like the date.
William wrote:and you make sure that all incoming input into the database is UTF-8
How to do that?
Re: Problem with "ë" letter in the table
Posted: Tue Mar 24, 2009 11:57 pm
by sujithtomy
Hello,
utf-8 char set in database.
Regards,
Sujith
Re: Problem with "ë" letter in the table
Posted: Wed Mar 25, 2009 10:02 am
by MicroBoy
Now when I use mysql_set_charset('utf8'); in the read page is happening like in the photo (the letter ë in the date it's ok but the letter ë in emri and lajmi are showing as A):
http://img220.imageshack.us/my.php?image=70648566.jpg
-----------------------------------------------------------------
When I use mysql_set_charset('utf8'); in the add page is happening like in the photo (the letter ë in the emri and lajmi are ok but the letter ë in date is showing as ?):
http://img205.imageshack.us/my.php?image=80456805.jpg
p.s. add page is the page I use to add news, the read page is the page that I use to show news in table.