collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: non-Latin characters in the bot  (Read 3754 times)

0 Members and 1 Guest are viewing this topic.

Offline CheRny

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
non-Latin characters in the bot
« 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]);




Offline iComa

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: non-Latin characters in the bot
« Reply #1 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.
Whitecoma

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 485
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal