-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Long filename contains unicode characters with by-file
truncates error
#214
Comments
by-file
truncates errorby-file
truncates error
You would think I would be aware of this considering how much time I have spent looking over unicode recently. Its down to it using bytes and not characters. Its especially annoying because it trims from the front, which isn't how Go lets you walk runes.... but not impossible to rectify. I can see the size never matching up though depending on the characters though, but we can fix the current issues for sure. |
You could have a play around with https://godoc.org/golang.org/x/text/width to calculate the display width. |
I actually found this just then http://github.com/mattn/go-runewidth which might be able to solve this. |
Thanks! |
@lingsamuel No problem at all. |
* Update README.md * SLOCCount came before cloc * resolve boyter#206 * First cut at boyter#210 * Add "gohtml" and "gotxt" to the list of extensions for Go templates These are the default extensions that e.g. GoLand uses, and some other tools as well I believe. It's useful as it disambiguates between templates for html/template and text/template. * partial fix for boyter#214 * resolve after feedback * Mostly ready for boyter#211 * real fix for issue214 * few tests and typo * Resolvehttps://github.com/boyter/issues/208 * Update to remove wrong Go version mentioned boyter#220 Co-authored-by: Ben Boyter <[email protected]> Co-authored-by: AlDanial <[email protected]> Co-authored-by: Ben Boyter <[email protected]> Co-authored-by: Martin Tournoij <[email protected]>
Describe the bug
Long filename contains unicode characters with
by-file
truncated incorrectly.To Reproduce
Output:
Expected behavior
��
shouldn't appear, indent should works properly.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: