1
0
Fork 0
forked from External/ergo

normalize all unicode input from the client

This commit is contained in:
Jeremy Latt 2014-02-25 20:17:26 -08:00
parent a2c05ed50d
commit 45bb0d05e7
4 changed files with 29 additions and 22 deletions

View file

@ -2,6 +2,7 @@ package irc
import (
"bufio"
"code.google.com/p/go.text/unicode/norm"
"io"
"log"
"net"
@ -23,7 +24,7 @@ type Socket struct {
func NewSocket(conn net.Conn, commands chan<- editableCommand) *Socket {
socket := &Socket{
conn: conn,
reader: bufio.NewReader(conn),
reader: bufio.NewReader(norm.NFKC.Reader(conn)),
writer: bufio.NewWriter(conn),
}