BeBot - An Anarchy Online and Age Of Conan chat automaton

General => General discussion => Topic started by: iComa on July 06, 2010, 08:26:36 pm

Title: Cyrillic... again ;)
Post by: iComa on July 06, 2010, 08:26:36 pm
Hi all =) 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. When 2 characters in  guest group,  both can see cyrillic symbols, but when one of them just in private group, i see ???????? symblos.
Title: Re: Cyrillic... again ;)
Post by: iComa on July 09, 2010, 05:05:36 pm
Can anyone answer me?  :)
Title: Re: Cyrillic... again ;)
Post by: Khalem on July 09, 2010, 06:09:22 pm
This has been mentioned before elsewhere on the forum, but I'll restate it.

The problem lies with the fact that AO and AoC use UTF8.

PHP however does not offer full UTF8 handling. Ie string functions that count characters will break etc since characters in Unicode is represented with multiple characters amongst other problems.

As such we use the built in PHP function utf8_encode/decode which converts to ISO-8859-1 before the bot handles anything, and then back into UTF8 when anything is sent. This in turn will break for numerous special case latin languages as well as cyrillic, hebrew and arabic and so on.

This problem won't really be solved properly until PHP 6 is released.

In the meantime a workaround was posted a while ago which allows the bot to handle cyrillic without the need for the iconv library to be installed:
http://bebot.link/bebot-0-2-support/iconv/msg3927/#msg3927

Title: Re: Cyrillic... again ;)
Post by: iComa on July 09, 2010, 07:16:29 pm
tyvm ;)
SimplePortal 2.3.7 © 2008-2024, SimplePortal