Skip to content

M-x gofmt removes unicode characters. #1816

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

Closed
gopherbot opened this issue May 12, 2011 · 5 comments
Closed

M-x gofmt removes unicode characters. #1816

gopherbot opened this issue May 12, 2011 · 5 comments

Comments

@gopherbot
Copy link
Contributor

by nmichaels:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1: Put this in an emacs buffer in go-mode:
package main

import _ "⚛sdl"

func main () {
    
}

2: M-x gofmt

What is the expected output?
package main

import _ "⚛sdl"

func main() {
    
}

What do you see instead?
package main

import _ " sdl"

func main() {

}


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

Which operating system are you using?
32-bit Debian on a 64-bit machine

Which revision are you using?  (hg identify)
2f0fa51fa2da weekly/weekly.2011-04-27

Please provide any additional information below.
Something about the interaction between Emacs and gofmt seems to be stripping the
unicode out. If I run gofmt directly from the command line, everything's fine.
@rsc
Copy link
Contributor

rsc commented May 13, 2011

Comment 1:

Status changed to HelpWanted.

@gopherbot
Copy link
Contributor Author

Comment 2 by ajmani:

I think I have a fix in http://golang.org/cl/4532057/
Please try patching it in to see if it fixed the problem in your environment.  It works
for me with your example code on MacOS.

@gopherbot
Copy link
Contributor Author

Comment 3 by nmichaels:

Yep, that did it. It's fixed for M-x gofmt and gofmt-before-save.

@Sajmani
Copy link
Contributor

Sajmani commented May 13, 2011

Comment 4:

Cool.  FYI the fix moved to http://golang.org/cl/4523065/ (but it's the same
change)

@rsc
Copy link
Contributor

rsc commented May 13, 2011

Comment 5:

fixed by http://code.google.com/p/go/source/detail?r=3a152e2c4126

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

3 participants