Contact: aviboots(AT)netvision.net.il
39,900 questions
51,831 answers
573 users
package main import ( "fmt" "unicode/utf8" ) func main() { { str := []byte("Hello, 世界") b := utf8.Valid(str) fmt.Println(b) } { str := []byte{0xa3, 0xed, 0xf} b := utf8.Valid(str) fmt.Println(b) } } /* run: true false */