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: Sending UTF8 encoded string as return value of command_handler() in module  (Read 1518 times)

0 Members and 1 Guest are viewing this topic.

Offline Kyeno

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
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!

Offline Qcbcal50

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Where can this latests Snapshot be downloaded ?

Offline Kyeno

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
There you go https://nodeload.github.com/J-Soft/BeBot-legacy/zipball/master. Actually found that link somewhere on that forum.

Any clues about my case though?

 

* 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: 674
  • 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