How to handle foreign language (hangul)

When I build below code, I got error messages like

command-line-arguments

.\test0.go:6:22: invalid UTF-8 encoding
I also tried to install some packages to solve this problem like golang.org/x/text.
But I got error messages like
go: missing Git command. See https://golang.org/s/gogetcmd
After dropping by the web site, I installed git progrm.
But it’s still problematic.
---------------below code-------------------
package main

import “fmt”

func main() {
fmt.Println(“Hello, 세계”)
}

Your code works fine on the playground:

https://play.golang.org/p/w4XbOeWmih4

When you store it locally make sure to properly save it as UTF-8 and not any other encoding.

1 Like

Thanks very much. It works now. ^^*
I poorly coded with Perl and small monitors over 10 years.
So I habitually coded using notepad.
I should code using other programs.