This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Problems with Eggdrop and extended characters. (utf-8)

Old posts that have not been replied to for several years.
Locked
A
Alpha
Voice
Posts: 15
Joined: Sat Nov 27, 2004 12:27 am
Location: Tromsø, Norway
Contact:

Problems with Eggdrop and extended characters. (utf-8)

Post by Alpha »

Hi!


One of my linux-boxes was recently upgraded from Fedora Core 1 to Core 2. I had to build a new eggdrop from source, and installed eggdrop1.6.17. I copied the eggdrop-executeable and modules to my old directory, overwriting the old files. The bot started up as normal, but failed to join my channel. The channelname has the norwegian character "ø" in it's name, but this was replaced by an "Ã". This is an old problem, one I've come across before. But I've forgotten how it was solved...

The TCL version is 8.4.5-7, on a Fedora Core 2 box.


Any input is appreciated, thanx!
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

set your console +v and inspect the content of bot's JOIN msg; this might give some hint of what's happening - whether your bot tries to join that channel at all
A
Alpha
Voice
Posts: 15
Joined: Sat Nov 27, 2004 12:27 am
Location: Tromsø, Norway
Contact:

Post by Alpha »

The bot does everything it's supposed to do. It joins the correct channel, but with an "Ã" instead of the "ø" in the channelname.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

include this in your config before loading module channels:

Code: Select all

proc u2a {s} {
    set res ""
    foreach i [split $s ""] {
        scan $i %c c
        if {$c<128} {append res $i} else {append res \\u[format %04.4X $c]}
    }
    set res
 } ;#RS
it converts norvegian chars in strings to \u-escaped ASCII

then specify your channel names (in the config or .chan file) as [u2a #yournorgechannel]
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

or you could just fix the encoding on the box your bot is running from.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

gb wrote:or you could just fix the encoding on the box your bot is running from.
I don't believe that would help... but I may be wrong
A
Alpha
Voice
Posts: 15
Joined: Sat Nov 27, 2004 12:27 am
Location: Tromsø, Norway
Contact:

Post by Alpha »

Yes! Encoding is a step in the right direction.. If I remember correctly, this was resolved using a few simple commands, probably SET & EXPORT? However, I can't remember what it was. I've compared to another Fedora box and can't find out what I need to change from what I read off the "set" command. Any further input?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

did you try that u2a proc?
A
Alpha
Voice
Posts: 15
Joined: Sat Nov 27, 2004 12:27 am
Location: Tromsø, Norway
Contact:

Post by Alpha »

No. I'd like this problem fixed, instead of making a half-good TCL workaround.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

if it works for your bot wouldn't it be full-good or am I missing something here?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

anyway

try export LANG=no, nn_NO, nb_NO, or whatever norvegian locales you happen to have on your system
Locked