Пример #1
0
func main() {
	gtk.SetLocale()

	bs, _, _, err := glib.LocaleFromUtf8("こんにちわ世界\n")
	if err == nil {
		syscall.Write(syscall.Stdout, bs)
	} else {
		fmt.Println(err.Message())
	}
}
Пример #2
0
func main() {
	gtk.SetLocale()

	bs := ([]byte)("こんにちわ世界")

	str, bytes_read, bytes_written, error := glib.LocaleToUtf8(bs)
	if error == nil {
		fmt.Printf("str=%s, bytes_read=%d, bytes_written=%d\n", str, bytes_read, bytes_written)
	} else {
		println(error.Message())
	}
}