You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
fmt.Printf("%5s|\n", "a")
fmt.Printf("%5s|\n", "aa")
fmt.Printf("%5s|\n", "aaa")
fmt.Printf("%5s|\n", "a·a")
What is the expected output? What do you see instead?
The bar "|" should be at the same column for all. It is not
for the last Printf, which has a non-keyboard character (the mid-dot).
What is your $GOOS? $GOARCH?
darwin, amd64
Which revision are you using? (hg identify)
0692c79ada0a+ tip
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
This isn't so obvious.
ANSI C defines printf to count bytes, not characters, when padding. The current code
implements the ANSI C
spec on purpose. Go does not have to be the same, but it also does not have to be
gratuitously different.
Opinions welcome.
-rob
The text was updated successfully, but these errors were encountered: