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.

[SOLVED] which encoding for displaying ascii chars?

Help for those learning Tcl or writing their own scripts.
Post Reply
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

[SOLVED] which encoding for displaying ascii chars?

Post by raider2k »

hello everyone,

I'm soon migrating to a newer debian version as support for the older ones will be dropped. to be prepared I installed debian 10 and installed latest eggdrop version.

as I have lots of ascii characters in my scripts outputs (like • or » or german and nordic letters like ö) they are now not getting displayed correctly on irc. On the new system they appear as • or » on the irc.
This is not a new issue which is why in the past I chose a latin1 or latin15 charset (dpkg-reconfigure locales), logged on to ssh with new locale settings, had eggdrop die, start it up again and it used to work. I was not successful with this this time...

I tried he following locales:
- en_US.UTF-8
- en_US ISO-8859-1
- en_US.ISO-8859-15
- de_DE.UTF-8
- de_DE@euro ISO-8859-15

and every time did a fresh ssh logon, then bot restart.

when I use alt+numpad to type those letters they show up correctly in the terminal (ssh) window. they also look correct when I type them into a tcl script - unless those chars are in a tcl file already when opening one, then they look like a block. I put such a character in a txt file and let it cat to terminal window: displayed ok.
Because of that I also tried using the utf-8 codes, such as \xBB but I get the same result regardless of system locale set. however when I do "putlog "» - \xBB" both show up ok in eggdrop telnet session. It is not irc server related as it worked on the same networks before.

I really hope someone can help with this issue bc I don't know what to do anymore to display those characters correctly again :(

thx to everyone right away!
Last edited by raider2k on Sun Aug 23, 2020 4:06 am, edited 1 time in total.
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Are your scripts in utf-8 ? try to use iconv with a faulty one to ensure it is, and reload it.
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

ok, that's new to me. before I look into it: how can I find out what is the current encoding of a file?
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

Tried a lot with iconv and it took me a very long time to figure the right set. In the end I could not say which setting was the correct one for iconv as I changed back to a latin locale on the eggdrop system and the owner of the ircd also upgraded to a newer version.

As a matter of fact iconv helped and I learnt something new. Thanks CrazyCat!
Post Reply