Omnimaga

Omnimaga => Discontinued => Our Projects => OmnomIRC Development => Topic started by: alberthrocks on October 30, 2012, 05:51:59 pm

Title: New — Débugging Unicode Issues
Post by: alberthrocks on October 30, 2012, 05:51:59 pm
This is just a little reminder for myself to fix a major issue - whenever unicode characters (like the long dash in the title) are used, New crashes.

(This also serves as a test to crash the bot with.)
Title: Re: New — Debugging Unicode Issues
Post by: alberthrocks on October 30, 2012, 05:57:29 pm
Testing

EDIT: Bug fixed. Apparently, you have to .decode("utf-8") for unicode titles like this before re-encoding and sending to IRC.
Title: Re: New — Debugging Unicode Issues
Post by: DJ Omnimaga on October 30, 2012, 06:39:08 pm
Ah I see now why it kept disconnecting. What about special chars like accents?
Title: Re: New — Débugging Unicode Issues
Post by: alberthrocks on October 30, 2012, 06:56:47 pm
It should work, since it's unicode! (This post, as a result, shouldn't crash New!)
Title: Re: New — Débugging Unicode Issues
Post by: DJ Omnimaga on October 30, 2012, 07:10:53 pm
That's good to hear then :)
Title: Re: New — Débugging Unicode Issues
Post by: Sorunome on January 03, 2013, 10:56:54 pm
bumpedebump test
I am working atm on the post bot, for those who don't know ;)
Title: Re: New — Débugging Unicode Issues
Post by: DJ Omnimaga on January 03, 2013, 11:02:02 pm
I thought Alberthro was the one with access? ???
Title: Re: New — Débugging Unicode Issues
Post by: Sorunome on January 03, 2013, 11:25:16 pm
I have access to the bot by now :P
That is also how i managed to do the omni stories
Title: Re: New — Débugging Unicode Issues
Post by: Sorunome on January 04, 2013, 12:34:37 am
Dudes, stop posting in other threads, i'm only having problems with sending now, recieving seems to work :P
Title: Re: New — Débugging Unicode Issues
Post by: Sorunome on January 04, 2013, 01:00:33 am
Ok, final test, but it seems to be working!
I manage to do where albertrocks failed XD/me runs
Title: Re: New — Débugging Unicode Issues
Post by: Sorunome on May 30, 2014, 08:10:09 am
yet another test.
This time omnomirc is having charset issues ._.
Title: Re: New — Débugging Unicode Issues
Post by: Streetwalrus on May 30, 2014, 09:15:19 am
The thing is, some people use Latin-1 and some use UTF-8. Xchat can automagically select the charset to use per line. Basically if a line fails Unicode validation, it will use Latin-1 when receiving. When sending, it uses latin-1 unless you used characters that need Unicode.
Title: Re: New — Débugging Unicode Issues
Post by: Sorunome on May 30, 2014, 09:29:30 am
Yeah, I did now encoding detection for the bot, but that one topic, for some reason, doesn't get detected correctly, eiyerons new topic.
For detection I use chardet.