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

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

Author Topic: non-Latin characters in the bot  (Read 8956 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
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


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


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

* Who's Online
  • Dot Guests: 277
  • 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