BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: Kyeno on October 11, 2012, 09:27:31 am

Title: Sending UTF8 encoded string as return value of command_handler() in module
Post by: Kyeno on October 11, 2012, 09:27:31 am
Hello and welcome on the forums!
I am a professional PHP developer and UNIX system administrator... also an addicted Age of Conan player and a social guild co-leader. :)

I know the UTF8 question actually appeared around the forums plenty times already, but even reading them all and doing a lot of trials-and-errors I can't get the thing working properly.

I'm using bebot-0.6.9-dev (latest snapshot) and I'm writing a custom module (yet to be released here for the public when I call it "stable"). What I need to do is sending a fully UTF8 string to guild chat and/or tell message directly as a return value of command_handler() method in my module (or any other way, if possible). The string contains language specific diacritic characters and is a properly encoded UTF8 on the input (tested)... yet not on the output.

Sending it rightaway as the return value gives me some unexpected characters in AOC (even though the same characters directly typed-in by the players do work properly; I mean hear polish, swedish, norwigian or even arabic chars). Doing utf8_encode() simply changes them into question marks.

Do I need to convert those to HTML entities or anything like that? Or maybe there's something I'm doing wrong?

Any help would be most apperciated. Thanks in advance!
Title: Re: Sending UTF8 encoded string as return value of command_handler() in module
Post by: Qcbcal50 on October 11, 2012, 05:40:26 pm
Where can this latests Snapshot be downloaded ?
Title: Re: Sending UTF8 encoded string as return value of command_handler() in module
Post by: Kyeno on October 11, 2012, 07:15:34 pm
There you go https://nodeload.github.com/J-Soft/BeBot-legacy/zipball/master (https://nodeload.github.com/J-Soft/BeBot-legacy/zipball/master). Actually found that link somewhere on that forum.

Any clues about my case though?
SimplePortal 2.3.7 © 2008-2024, SimplePortal