Reply LinkBack Thread Tools Search this Thread
Old 14-10-2007, 12:02   #1 (permalink)
studioinart
Registered User
 
Join Date: Sep 2006
Location: manchester/England/UK/Earth
Posts: 37
Cyrillic Alphabet (russian) Problem! PHP-MySQL

Hi Friends;

I have a problem which is making me crazy

I'm making a russian website, so I did use;
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

But I still have problem with characters;
I see something like this at explorer;
�нтернет-программирование дает

but at code side, I see all characters fine;
Интернет-программирование дает возможность разрабатывать и внедрять максимально эффективные решения




Also I have a mysql database, and I made;
Collation; sp1251_general_ci
and i see the data in correct characters at phpMyAdmin.

but when i call this data by php-sql, at explorer I see only
????????? ???????????? "??????" ???????? ??????




I hope you can give an idea about this problem...
Thank all you very much...
  Reply With Quote
Old 14-10-2007, 12:34   #2 (permalink)
flasherr
latvian
 
flasherr's Avatar
 
Join Date: Apr 2007
Location: Latvia, Riga
Posts: 20
charset=utf-8
  Reply With Quote
Old 14-10-2007, 14:27   #3 (permalink)
studioinart
Registered User
 
Join Date: Sep 2006
Location: manchester/England/UK/Earth
Posts: 37
Quote:
Originally Posted by flasherr
charset=utf-8

Thanks for answer, but I tried at first, "same problem"...

I did sort out the static content's character problem by including one header.php. Now my problem is only to see ????????? when i call some data from mysql database : (
  Reply With Quote
Old 15-10-2007, 10:29   #4 (permalink)
studioinart
Registered User
 
Join Date: Sep 2006
Location: manchester/England/UK/Earth
Posts: 37
anybody has any idea?

I tried charset=utf-8 as well. but no success. All character, embeded to the files, are fine... there is no problem about them. But when I call data from mysql db, i see ?????? as output to explorer
  Reply With Quote
Old 15-10-2007, 13:13   #5 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 2,007
what charset have you set in the database?
__________________
  Reply With Quote
Old 15-10-2007, 17:40   #6 (permalink)
studioinart
Registered User
 
Join Date: Sep 2006
Location: manchester/England/UK/Earth
Posts: 37
Quote:
Originally Posted by freelancr
what charset have you set in the database?

mysql db = utf8_unicode_ci
php page = <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

but i tried cp_1251_general_ci, utf-8, latin as well.
i tried to use same encoding at mysql and php page as well, but no success
  Reply With Quote
Old 15-10-2007, 19:47   #7 (permalink)
studioinart
Registered User
 
Join Date: Sep 2006
Location: manchester/England/UK/Earth
Posts: 37
---------------------------------------------------------------------

PHP PAGE:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


---------------------------------------------------------------------

MySQL DB

MySQL charset: UTF-8 Unicode (utf8)

---------------------------------------------------------------------

PHP Code at Dreamweaver

<li><p class="information">необходимые поля для заполнения

looks fine

---------------------------------------------------------------------

Browser Output

����������� ���� ��� ����������

---------------------------------------------------------------------


Why is this?
I hope you can advise any solution.

many thanks friends...
  Reply With Quote
Old 15-10-2007, 21:19   #8 (permalink)
gk
geek
 
gk's Avatar
 
Join Date: Oct 2006
Location: *.everywhere
Posts: 204
Send a message via ICQ to gk Send a message via AIM to gk Send a message via MSN to gk Send a message via Yahoo to gk
you also have to save the file in utf-8. I think DW default is is ISO somehting
__________________
Quote:
"Why reinvent the wheel"? Simply because it's not round enough and I don't like the treads.
  Reply With Quote
Old 16-10-2007, 03:21   #9 (permalink)
studioinart
Registered User
 
Join Date: Sep 2006
Location: manchester/England/UK/Earth
Posts: 37
Quote:
Originally Posted by gk
you also have to save the file in utf-8. I think DW default is is ISO somehting

yes i did change that part as well
Modify > Page Properties > Title/Encoding...

Everything looks fine, I just dont understand what is wrong!
Im sure it is a very simple problem at somewhere, so annoying... anyway.... thanks for helps guys...
  Reply With Quote
Old 09-05-2008, 15:00   #10 (permalink)
jazzyyy
Registered User
 
Join Date: May 2008
Posts: 1
cyrillic ????? problem

Hey there I had the same problem , I am using Macedonian characters (Cyrillic) and i Allwasy got ?????? on the Web Browser,
I've entered this two functions RIGHT AFTER the connection in the PHP code:
ex: $query = "SELECT...
$result = mysql_query($query);
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET NAMES utf8");
and now finally everything is OK.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8