Forum Webscript.Ru
Программирование => PHP => Тема начата: frax от 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
-
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
-
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
-
detect posted user charset and convert win-1251 (or koi8-r) to utf-8 using iconv (http://www.php.net/iconv)
storing all multi-language data in utf-8
for searching also convert search query to utf-8
P.S: sorry for english
-
great, so the best is to use utf-8 for storing and koi8-r or win-1251 for output.
thank you very much !
-
Что-то ни фига не могу перевести. Как настроить MyADMIN с кодировкой win-1251?