aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
530 stars 97 forks source link

encoding in privmsg #69

Closed bayang closed 7 years ago

bayang commented 7 years ago

Hi,

I'm a newbie in Rust so it might be a stupid question, but, I just tried to print in my terminal the received Command::privmsgs in a chan and sometimes I get this kind of stuff : ACTION blah blah 

my terminal is configured in UTF-8 Am I missing something obvious ?

retep998 commented 7 years ago

That's a CTCP command. The encoding is fine.

aatxe commented 7 years ago

Indeed, the way CTCP works is that it uses null characters to contain the CTCP command. Typically, full IRC clients will choose to display these commands in different ways. For example, a CTCP ACTION might be displayed as user blah blah.

bayang commented 7 years ago

Ok right,

thank you both fo answering !

FreeFull commented 7 years ago

Just a quick correction, CTCP doesn't use null characters (and neither does any other part of the IRC protocol). The CTCP delimiters are the 0x01 character

aatxe commented 7 years ago

Oh whoops, you're right it's SOH (start of heading), not null.