Автор Тема: php mysql cyrillic chars  (Прочитано 4104 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн frax

  • Заглянувший
  • Новичок
  • *
  • Сообщений: 3
  • +0/-0
  • 0
    • Просмотр профиля
    • http://
php mysql cyrillic chars
« : 29 Мая 2003, 23:13:21 »
hi,

i have a problem with storing cyrillic text in a mysql db.
if i enter cyrillic characters in phpmyadmin all chars are converted to html special chars (#&1088 for example)
i could live with this, i didn´t found any way or solution to store cyrillic charcters without conversion.

the next problem is to convert the characters back.
html_entity_decode() doesn´t work neither does convert_cyr_string()

perhaps some of you can tell how to solve this problems or if there are english webpages about that topic, i didn´t find any.

thanks,

frax

Оффлайн trent

  • Заглянувший
  • Новичок
  • *
  • Сообщений: 18
  • +0/-0
  • 0
    • Просмотр профиля
    • http://www.low.ru/
php mysql cyrillic chars
« Ответ #1 : 30 Мая 2003, 02:22:22 »
http://www.mysql.com/doc/en/configure_options.html#IDX246
http://www.mysql.com/doc/en/Character_sets.html

phpMyAdmin - choose Russian(ru-win-1251 or koi8-r)

add Russsian locale in u Operation System

Оффлайн frax

  • Заглянувший
  • Новичок
  • *
  • Сообщений: 3
  • +0/-0
  • 0
    • Просмотр профиля
    • http://
php mysql cyrillic chars
« Ответ #2 : 30 Мая 2003, 03:08:08 »
thank you very much !

due to your answer i recognized that the main problem isnt mysql, but the html charset of the page where the is to enter data into the database.

and now i don´t know wether i should use utf-8 or windows-1251 or koi8-r.
it seems that data entered with koi8-r isn´t readable with utf-8 and vice versa

what should i use or whats the best way ?
can utf-8 (unicode) encounter problems (more problems) on some OS ?
whats the best for searching in the db ?
i really don´t understand how mysql stores the data entered.
depending on the charset from the html-file the chars in the database are different.
i also have some latin and german letters in the db and on the output-pages. can there be problems with cyrillic charsets ?

im very happy to find this place.
and i dont think i have many more questions after this.

thank you !

frax

Оффлайн trent

  • Заглянувший
  • Новичок
  • *
  • Сообщений: 18
  • +0/-0
  • 0
    • Просмотр профиля
    • http://www.low.ru/
php mysql cyrillic chars
« Ответ #3 : 30 Мая 2003, 04:11:20 »
detect posted user charset and convert win-1251 (or koi8-r) to utf-8  using iconv
storing all multi-language data in utf-8
for searching also convert search query to utf-8

P.S: sorry for english

Оффлайн frax

  • Заглянувший
  • Новичок
  • *
  • Сообщений: 3
  • +0/-0
  • 0
    • Просмотр профиля
    • http://
php mysql cyrillic chars
« Ответ #4 : 30 Мая 2003, 12:54:28 »
great, so the best is to use utf-8 for storing and koi8-r or win-1251 for output.
thank you very much !

Оффлайн Abram

  • Фанат форума
  • Постоялец
  • ***
  • Сообщений: 116
  • +0/-0
  • 0
    • Просмотр профиля
    • http://
php mysql cyrillic chars
« Ответ #5 : 27 Октября 2004, 16:19:41 »
Что-то ни фига не могу перевести. Как настроить MyADMIN с кодировкой win-1251?

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28