forked from External/ergo
normalize all unicode input from the client
This commit is contained in:
parent
a2c05ed50d
commit
45bb0d05e7
4 changed files with 29 additions and 22 deletions
|
|
@ -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),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue