Added support for stringprep, as required by the RFC.
--- a/structs.go Mon Jan 16 20:30:29 2012 -0600
+++ b/structs.go Mon Jan 23 21:54:41 2012 -0700
@@ -10,6 +10,7 @@
"bytes"
"flag"
"fmt"
+ "go-idn.googlecode.com/hg/src/stringprep"
"io"
"os"
"regexp"
@@ -201,9 +202,9 @@
if parts == nil {
return false
}
- jid.Node = parts[2]
- jid.Domain = parts[3]
- jid.Resource = parts[5]
+ jid.Node = stringprep.Nodeprep(parts[2])
+ jid.Domain = stringprep.Nodeprep(parts[3])
+ jid.Resource = stringprep.Resourceprep(parts[5])
return true
}