Help to display a russian webpage

R2
На сайте с 08.11.2008
Offline
0
758

Hi. I have a website who is selling some products. I translated these descriptions from English in Russian language.

When i display webpage in browser is showing ???? instead russian characters. (is not a problem from my browser because i can see characters on other russian sites).

1.What collation i should use in phpMyadmin for row eith description in russian ? (some description will contain some words who must remain in English ex: Microsoft)

2. What charset should i use for that collation ? <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5,1251 etc">

3.Pages from the root (ftp) who have the code must be saves in UTF-8 or other instead ANSII ?

In Cpanel at information schema->Databases i have only utf8_general_ci for CHARACTER_SETS , COLLATIONS.Should be different?

please respond in english if you can help me

спасибо

gerkon
На сайте с 21.10.2005
Offline
40
#1

1.What collation i should use in phpMyadmin for row eith description in russian ? (some description will contain some words who must remain in English ex: Microsoft)

You must use cp1251_general_ci collation for russian language. English words will be normally displayed in this collation.

2. What charset should i use for that collation ? <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5,1251 etc">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

3.Pages from the root (ftp) who have the code must be saves in UTF-8 or other instead ANSII ?

If pages contains russian chars you must use windows-1251 Encoding.

If you need help - you can talk with me over icq (323918) or skype (andrey_piskarev)

P.S. Additional question. When you have enter in PHPMyAdmin - what you see in tables with russian words? Correct characters or "???" chars?

C уважением, Андрей. Пользуюсь этим хостингом уже 4 года! (http://www.replay.ru/index.php?part_id=3600) Ведущий манул Pixshock.net (http://www.pixshock.net)
dkameleon
На сайте с 09.12.2005
Offline
386
#2

rowtc2,

I recommend you to use UTF-8 everywhere.

It allows you to use Cyrillic and non-Cyrillic symbols in single page and database.

utf8_general_ci for mysql must be okay.

and don't listen to gerkon. Otherwise you'll have a lot of problems with code page selection for your ANSI data :)

Дизайн интерьера (http://balabukha.com/)
gerkon
На сайте с 21.10.2005
Offline
40
#3

dkameleon, да все норм у него будет :)

dkameleon
На сайте с 09.12.2005
Offline
386
#4

gerkon, не будет. у него уже не норм :)

на протяжении нескольких лет программеров учил корректно с иностранными кодировками работать, особенно если материалы в АНСИ предоставляются (регулярный конфликт с региональными настройками). так что подводные камни как бы знаю не понаслышке.

ПС. Мне будет интересно, что вы ему будете советовать, если вдруг он захочет в ту же таблицу поместить ещё и немецкое описание, с умляутами ;)

gerkon
На сайте с 21.10.2005
Offline
40
#5
dkameleon:

ПС. Мне будет интересно, что вы ему будете советовать, если вдруг он захочет в ту же таблицу поместить ещё и немецкое описание, с умляутами ;)

Такого в тз не было ☝ 😆

Если умляуты то да - будет жестко :)

Ну не люблю я UTF просто :) А может просто не умею его готовить :)

R2
На сайте с 08.11.2008
Offline
0
#6

1. I have changed metatags

<meta http-equiv="Content-Language" content="RU" />

<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">

2. I have saved all ftp pages with UTF-8 encoding.

3. I changed collation in phpmyadmin in utf8_general_ci ,utf8_unicode_ci ,and cp1251_general_ci

Website is displaying russian word putted with copy-paste on ftp page, but when display from sql is still ???

I try with copy-paste some russian words from a russian site in mysql->product row. In mysql are russian characters but on website are ????.

Is possible to must formatting the text in some before copy or update in mysql ? When i click on a product in sql there are russian characters in description row.

I tryied <meta http-equiv="Content-Language" content="DE" /> with copy-paste german text in database and special characters like &#252; are replaces with a small black picture .

XC
На сайте с 07.05.2006
Offline
37
#7

After connecting to the database in your scripts, try to make query:

SET NAMES utf8;

It must help to solve this problem.

WM2Directi.ru (http://wm2directi.ru) - платежные шлюзы для реселлеров доменов
R2
На сайте с 08.11.2008
Offline
0
#8
X-Ception:
After connecting to the database in your scripts, try to make query:
SET NAMES utf8;
It must help to solve this problem.

Yes ,indeed. It works with UTF-8 and set names. Thanks a lot gerkon and all of you.

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий