Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: Hello, 世界 -> Hello, õ©ûþòî #3346

Closed
gopherbot opened this issue Mar 18, 2012 · 6 comments
Closed

windows: Hello, 世界 -> Hello, õ©ûþòî #3346

gopherbot opened this issue Mar 18, 2012 · 6 comments

Comments

@gopherbot
Copy link
Contributor

by eduard.castany:

What steps will reproduce the problem?
package main

import "fmt"

func main() {
    fmt.Println("Hello, 世界")
}

go run hola.go

What is the expected output?
Hello, 世界

What do you see instead?
Hello, õ©ûþòî

Which compiler are you using (5g, 6g, 8g, gccgo)?
go.weekly.2012-03-13.windows-amd64.msi

Which operating system are you using?
windows 7 64
@alberts
Copy link
Contributor

alberts commented Mar 18, 2012

Comment 1:

http://stackoverflow.com/questions/379240/is-there-a-windows-command-shell-that-will-display-unicode-characters
If you do
chcp 65001
go run hola.go > utf8.txt
and then open utf8.txt, you see the right stuff.
If you change the font of the command prompt to "Consolas" or "Lucida Console", you'll
see Hello, ?? or Hello [][].
If you copy and paste that to a place that understands UTF-8, you see this again:
Hello, 世界

@alberts
Copy link
Contributor

alberts commented Mar 18, 2012

Comment 2:

http://bugs.python.org/issue1602
specifically,
http://bugs.python.org/issue1602#msg145898
seems applicable.

@dsymonds
Copy link
Contributor

Comment 4:

It's not clear what the bug here is. It sounds like the Go program is producing UTF-8,
but the thing trying to print it is not configured for UTF-8. That doesn't sound like a
Go bug to me; it sounds like either a bug in the program (e.g. if it needs to work in an
environment that can't render UTF-8 then it shouldn't output UTF-8), or a configuration
issue for the Windows terminal.

Labels changed: added priority-later, removed priority-triage.

Status changed to WaitingForReply.

@gopherbot
Copy link
Contributor Author

Comment 5 by eduard.castany:

It was executed using cmd.exe
can it be configured to allow UTF-8 with the .msi?

@alexbrainman
Copy link
Member

Comment 6:

We had that conversation before:
https://groups.google.com/d/msg/golang-nuts/WhpWNhBRMFM/u5wLJsH4iNMJ. There were some
solutions mentioned. Even some code.
Alex

@rsc
Copy link
Contributor

rsc commented Mar 26, 2012

Comment 7:

Status changed to Duplicate.

Merged into issue #3376.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants