echelon icon indicating copy to clipboard operation
echelon copied to clipboard

Chatlog and Cyrillic

Open ghost opened this issue 14 years ago • 13 comments

In chatlog not display Cyrillic characters: http://s017.radikal.ru/i400/1111/3e/d80da7ba4875.jpg http://s017.radikal.ru/i424/1111/03/dbef149370b6.jpg http://i027.radikal.ru/1111/47/3a885d600895.jpg

ghost avatar Nov 04 '11 05:11 ghost

I suspect this is an issue with char set. If you open inc/header.php on line 35 it says;

try changing that to the following; ""

I believe that is the most relevant issue with regards to character set. There are a couple other occurrences, with relation to script includes. Without some Cryillic data to test on I can't tell if that works. (If you can confirm it, I will push the change)

WickedShell avatar Nov 06 '11 17:11 WickedShell

I changed:

/echelon/inc/header.php from 36 meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" to 36 meta http-equiv="Content-Type" content="text/html; charset=utf-8"

/echelon/lib/plugins/chatlogs/class.php from 310 $msg = cleanvar(removeColorCode($data['msg'])); to 310 $msg = removeColorCode($data['msg']);

After that, everything was displayed correctly http://s59.radikal.ru/i164/1111/96/535bd18898e5.jpg

ghost avatar Nov 07 '11 10:11 ghost

I assume it fails without the removal of cleanvar in echelon/lib/plugins/chatlogs/class.php?

The cleanvar is there as anti-injection, and it's removal is not safe, but from looking at the documentation on some of the functions used in there (htmlentities specifically) it appears that that function also needs a charset. I will try and add an option to switch between multiple character sets so that the code will do the conversion for you, because you do want cleanvar() in there.

WickedShell avatar Nov 07 '11 15:11 WickedShell

Here's how it was in the original: $msg = cleanvar(removeColorCode($data['msg'])); http://s017.radikal.ru/i433/1111/eb/0c3c22dbfa9b.jpg

after changing: $msg = removeColorCode($data['msg']); http://s017.radikal.ru/i432/1111/96/b788e715ca62.jpg

ghost avatar Nov 08 '11 08:11 ghost

all as set above. does not work http://s45.radikal.ru/i109/1210/53/d5f1eebbd6e8.png http://s47.radikal.ru/i116/1210/97/1a43ba804ed0.png

Debian

Leden4ik avatar Oct 06 '12 20:10 Leden4ik

all as set above. does not work http://s45.radikal.ru/i109/1210/53/d5f1eebbd6e8.png http://s47.radikal.ru/i116/1210/97/1a43ba804ed0.png

Debian

Leden4ik avatar Oct 13 '12 08:10 Leden4ik

@Leden4ik Замени в файле echelon/lib/plugins/chatlogs/class.php $msg = cleanvar(removeColorCode($data['msg'])); на $msg = removeColorCode($data['msg']);

и в файле echelon/inc/header.php meta http-equiv="Content-Type" content="text/html; charset="" / на meta http-equiv="Content-Type" content="text/html; charset=utf-8" / (знаки больше-меньше убрал, т.к. не правильно отображались)

После этого всё должно работать.

ПС: аналогично, убрав cleanvar, можно поступить и здесь - http://www.banbutton.com/index.php/alternative-chatlog-page-for-echelon/

f1nik avatar Jan 08 '13 04:01 f1nik

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

Leden4ik avatar Feb 15 '13 08:02 Leden4ik

И да проблема не со стороны чата, а вообщем по всему сайту меняя названия на русское значения, то где бы то не было отображение идет вопросами

Leden4ik avatar Feb 15 '13 08:02 Leden4ik

Ну у меня ж работает http://s017.radikal.ru/i440/1302/b2/c824db568996.jpg

f1nik avatar Feb 15 '13 08:02 f1nik

Нет вы не поняли, так у меня по всему сайту, к примеру отредактировав в базе группы, и обозначив их русскими символами, все равно идет выдача вопросиков и именно только с echelon, так как отображение других сайтов на данной тачке нормальное.

Хочу спросить вас, у вас база в какой кодировке?

Ибо не понятно, почему такой вывод =(

Leden4ik avatar Feb 15 '13 08:02 Leden4ik

В основном кодировка - utf8_general_ci Название групп эшелона, если переименовать, у меня отображаются корректно. Или о каких группах речь?

f1nik avatar Feb 15 '13 10:02 f1nik

Подскажите пожалуйста!!! Почему у меня такие закорячки в базе данных óõ òû ëèâåíü в базе данных кодировка utf8 Сайт отображается без проблем по умолчанию кодировка utf8, а всё равно óõ òû ëèâåíü такие вот закорячки в логах чата , база данных Mysql помоги пожалуйста ?

Socolino avatar Nov 29 '17 00:11 Socolino