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: use US English error messages always #1834

Closed
gopherbot opened this issue May 16, 2011 · 6 comments
Closed

windows: use US English error messages always #1834

gopherbot opened this issue May 16, 2011 · 6 comments

Comments

@gopherbot
Copy link

by Ekspluati:

What steps will reproduce the problem?
1. Run all.bash on localized version of Windows.

What is the expected output?
No error from the program

What do you see instead?
--- cd ../doc/progs
helloworld3 failed: "hello, world can't open file; err=MA☼A☼ritettyA☼ polkua
ei lA¶ydy." is not "hello, world can't open file; err=no such file or
directory"
cannot create 8.out.exe

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Windows 7 (Finnish)

Which revision are you using?  (hg identify)
4d4e7adab561 tip

Please provide any additional information below.
"MA☼A☼ritettyA☼ polkua ei lA¶ydy." and "no such file or
directory" are the same error message but in different languages.
@rsc
Copy link
Contributor

rsc commented May 16, 2011

Comment 1:

It would be nice if we got the English text all the time on Windows,
to match the behavior on other systems.  Is it possible to ask for
non-localized error text?  Or else we could just hard-code a table
of error strings like we do for Unix?

Owner changed to @alexbrainman.

Status changed to Accepted.

@alexbrainman
Copy link
Member

Comment 2:

<peterGo-hat-on> <g>
From http://golang.org/doc/go_tutorial.html:
Now we can compile and run the program. On Unix, this would be the result:
    $ 6g file.go                       # compile file package
    $ 6g helloworld3.go                # compile main package
    $ 6l -o helloworld3 helloworld3.6  # link - no need to mention "file"
    $ helloworld3
    hello, world
    can't open file; err=No such file or directory
    $
Please, note the "Unix" bit. There is no promise the message will be the same everywhere.
<peterGo-hat-off>
In fact, building on my English Windows OS displays similar error message:
$ ./run
helloworld3 failed: "hello, world can't open file; err=The system cannot find the path
specified." is not "hello, world can't open file; err=no such file or directory"
$ 
The error doesn't stop the build, the build completes successfully.
I've never tried, but it looks to me, we can ask for error message to be always English
- see dwLanguageId parameter of FormatMessage. I believe, we use "default" language at
this moment, it is something that "user" wants. It is hard for me to make a judgement
(my default language is English), but I think it works the way it is intended.
Alex

@alexbrainman
Copy link
Member

Comment 3:

I am pretty sure your problem is a dup of 1899. Please, let me know if you think
different. Thank you.
Alex

Status changed to Duplicate.

Merged into issue #1899.

@peterGo
Copy link
Contributor

peterGo commented Feb 15, 2012

Comment 4:

This is not a duplicate of issue #1899. It should still be an open issue. For example,
go printout messy code
http://groups.google.com/group/golang-nuts/browse_thread/thread/cf9727737e5b4a00

@alexbrainman
Copy link
Member

Comment 5:

How about we will change the summary ...

Labels changed: added priority-someday, os-windows, removed priority-medium.

Status changed to HelpWanted.

@alexbrainman
Copy link
Member

Comment 7:

This issue was closed by revision b17a233.

Status changed to Fixed.

@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

4 participants