BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => BeBot Hyborian support => Topic started by: CheRny on July 06, 2008, 11:58:47 am

Title: non-Latin characters in the bot
Post by: CheRny on July 06, 2008, 11:58:47 am
There is no problem in the bot when you are using Latin characters. As soon as you start using non-Latin characters (ex. Cyrillic) all you see in logs just "????????", you are not able to relay to IRC as you are getting the same symbols "???????" all the time, you are not able to set your logon message in non-latin and so on. Seems to me by default all utf-8 symbols converts to iso-8859-1 by using utf8_encode/utf8_decode. I am not sure if it's a good decision but basically I just comment all utf8_encode/utf8_decode commands in php files and everything is working fine with non-latin characters. I am able to read logs, chat with my game mates in irc-client and so on. Hope it'll help someone to use non-latin.

Here is the list of lines you need to comment (bebot-hyborian.0.5.0.r13):

[\bebot-hyborian\main\15_ChatQueue.php]
Line 88 :                   $msg = utf8_encode($msg);
Line 93 :                   $msg = utf8_encode($msg);
Line 114 :                   $msg = utf8_encode($msg);
Line 119 :                   $msg = utf8_encode($msg);

[\bebot-hyborian\Sources\Bot.php]
Line 572 :             $msg = utf8_encode($msg);
Line 615 :          $msg = utf8_encode($msg);
Line 667 :             $msg = utf8_encode($msg);
Line 941 :          $args[1] = utf8_decode($args[1]);
Line 1156 :       $args[2] = utf8_decode($args[2]);
Line 1236 :       $args[2] = utf8_decode($args[2]);



Title: Re: non-Latin characters in the bot
Post by: iComa on July 03, 2010, 04:03:13 pm
Hello all =) sorry for necroposting ;) I need to know, what can i do to relay non-latin symbols from guest chat to GC and back, where someone writing cyrillic symbols i see ???? ???? ? ??? something like that.
SimplePortal 2.3.7 © 2008-2024, SimplePortal