irc: use utf8 instead of latin1. not sure if this is the best idea.

locals-and-roots
Doug Coleman 2016-05-09 12:11:44 -07:00
parent 449c740b23
commit cd89da032d
2 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Bruno Deferrari ! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors concurrency.mailboxes kernel calendar io.sockets USING: accessors calendar concurrency.mailboxes
destructors arrays sequences io.encodings.8-bit.latin1 ; io.encodings.utf8 io.sockets kernel ;
IN: irc.client.chats IN: irc.client.chats
CONSTANT: irc-port 6667 ! Default irc port CONSTANT: irc-port 6667 ! Default irc port
@ -47,6 +47,6 @@ TUPLE: irc-client profile stream in-messages out-messages
30 seconds >>reconnect-time 30 seconds >>reconnect-time
10 >>reconnect-attempts 10 >>reconnect-attempts
V{ } clone >>exceptions V{ } clone >>exceptions
[ <inet> latin1 <client> drop ] >>connect ; [ <inet> utf8 <client> drop ] >>connect ;
SINGLETONS: irc-chat-end irc-end irc-disconnected irc-connected ; SINGLETONS: irc-chat-end irc-end irc-disconnected irc-connected ;

View File

@ -1,9 +1,8 @@
! Copyright (C) 2008, 2010 Slava Pestov. ! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: fry irc.client irc.client.chats kernel namespaces USING: calendar debugger fry io io.encodings.utf8 io.launcher
sequences threads io.launcher io splitting irc.client irc.client.chats kernel make mason.common mason.git
make mason.common mason.git calendar math timers math sequences threads timers ;
io.encodings.8-bit.latin1 debugger ;
IN: irc.gitbot IN: irc.gitbot
: bot-profile ( -- obj ) : bot-profile ( -- obj )
@ -34,7 +33,7 @@ M: object handle-message drop ;
"--pretty=format:%h %an: %s" , "--pretty=format:%h %an: %s" ,
".." glue , ".." glue ,
] { } make ] { } make
latin1 [ lines ] with-process-reader ; utf8 [ lines ] with-process-reader ;
: updates ( from to -- lines ) : updates ( from to -- lines )
git-log reverse git-log reverse