You are here: Big Brother Bot ForumGeneral CategoryGeneral DiscussionMultilanguage (Russian) message into in-game chat 2
Pages: [1]   Go Down
  Print  
Author Topic: Multilanguage (Russian) message into in-game chat 2  (Read 2087 times) Bookmark and Share
Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« on: January 11, 2011, 03:33:31 PM »

http://www.bigbrotherbot.net/forums/general-usage-support/multilanguage-(russian)-message-into-in-game-chat/- this topic is still actual, i'm tried variations of encoding plugin_admin.xml - utf-8, cp1251, iso-8859-5, and result the same -
Quote
110112 01:20:30   CONSOLE   882:26 say;aa82d**************2d8f2fc742;0;Crang;!rules
110112 01:20:30   WARNING   RCON: ERROR sending: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
110112 01:20:30   WARNING   RCON: ERROR sending: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
110112 01:20:30   ERROR   RCON: too much tries. Abording (tell 0 ^0(^2b3^0)^7: ^3[pm]^7 ^3Rule #1: Huh?? Huh?? Huh?? Huh??)
, problem solving is out of here  Huh
if I turn in total commander text viewer (f3) view->UTF-8 and view->Windows encoding, while listing b3.log, - can see the original message in cyrillic
« Last Edit: January 11, 2011, 11:02:04 PM by crang » Logged

Beta Testers
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4, CoD5, BFBC2
Posts: 26
Offline Offline
« Reply #1 on: January 12, 2011, 09:29:19 AM »

this is a problem Echelon
if you click "Client chat History" page player
Cyrillic is displayed properly
Logged
Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« Reply #2 on: January 16, 2011, 02:40:59 AM »

What does the Echelon? I add text in the Cyrillic alphabet in the configuration of the plug and that does not appear in the chat.
Logged
Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« Reply #3 on: January 16, 2011, 03:27:54 AM »

Working!! ))
Just need to add this line in your q3a_rcon.py file
Code:
data = data.encode('cp1251')
after
Code:
data = data.strip()

but Echelon and XLRstats still didn't see cyrillic chars - think thats solving like previus problem
« Last Edit: January 16, 2011, 03:30:56 AM by crang » Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3483
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #4 on: January 16, 2011, 06:01:05 AM »

This is good news Crang. Can you describe in detail all the steps you need to achieve this ?

Sent from my HTC Legend using Tapatalk
Logged

Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« Reply #5 on: January 16, 2011, 07:58:31 AM »

This is good news Crang. Can you describe in detail all the steps you need to achieve this ?
XLRstats gets data from console to DB and Echelon gets data from status.xml and DB, and they both gathering data with clients.py, who is using q3a_rcon.py to read/write server socket(rcon). If I understanding right, than all what I need -  to convert (or set) encoding of recived data in q3a_rcon.py somewhere here:
Code:
def readSocket(self, sock, size=4096, socketTimeout=None):
...
return data.strip()
but that didn't work:
Code:
data = data.strip()
return data.encode('cp1251')
b3 writes
Quote
Testing RCON     : >>> Oops: No response
>>> Could be something wrong with the rcon connection to the server!
>>> Hint 1: The server is not running or it is changing maps.
>>> Hint 2: Check your server-ip and port.
and I'm stuck on this  Huh ...
Logged
Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« Reply #6 on: April 20, 2011, 11:48:49 PM »

Results fast testing v1.6 of B3 for cyrillic:
1. just on bot startup
Code:
110421 10:22:00 ERROR STDERR Traceback (most recent call last):
110421 10:22:00 ERROR STDERR   File "D:\Python27\lib\logging\__init__.py", line 865, in emit
110421 10:22:00 ERROR STDERR     stream.write(fs % msg.encode("UTF-8"))
110421 10:22:00 ERROR STDERR UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 84: ordinal not in range(128)
110421 10:22:00 ERROR STDERR Logged from file (unknown file), line 0
2.cyrillic rule in native plugin_admin.xml in game shows Huh??
3.cyrillic name in status.xml
Code:
<Clients Total="1">
                <Client CID="0" ColorName="@232^7" Connections="9" DBID="232" GUID="blablabla" IP="10.12.199.120" Joined="Thu Apr 21 10:02:34 2011" Level="1" Name="@232" PBID="blablabla" Score="0" State="2" Team="-1" Updated="Thu Apr 21 10:45:31 2011">
                        <Data Name="codguid" Value="blablabla"/>
                </Client>
        </Clients>
so  Undecided
Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3483
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #7 on: April 21, 2011, 12:03:41 AM »

Hi crang,

Please use the latest dev code from my github repo for cyrillic tests : https://github.com/courgette/big-brother-bot/zipball/master
Logged

Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« Reply #8 on: April 21, 2011, 12:43:26 AM »

Hi, Courgette.
previus tests was on xlr8or-big-brother-bot-v1.6.0b2-177-g3abdcb3
resuts on courgette-big-brother-bot-v1.5.0b2-409-g7a08da1:
1. the same
2. some better ) instead of "Huh?" now as on attached img
3. more vars in section <Game>, but with cyrillic name - the same



[attachment deleted by maintenance]
Logged
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3483
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #9 on: April 21, 2011, 01:28:18 AM »

too bad Sad Thanks for trying
Logged

Newbie
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 8
Offline Offline
« Reply #10 on: April 21, 2011, 03:02:23 AM »

Courgette, if you want to run some custom tests - feel free to contact me by icq 557459648
Logged
Tags: ascii 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal