Closed mattn closed 9 years ago
Yeah, it's kind of sad. Especially because the issue is windows-only.
I won't accept this patch as is, because it makes godit really ugly when using multiple views. See these lines: https://github.com/nsf/godit/blob/master/godit.go#L337-L412
Perhaps it's worth adjusting all of them. But since there are no ├
like symbols in basic ASCII, we will have to replace them with +
, therefore no need for fix_edges
method. The only purpose of which is to make things nice and smooth.
ok, btw, it's not issue just for windows. it's depend on locale. the some characters are two cells on japanese/chinese/korean locale.
Well, as far as I know on linux this character takes one cell, but I checked of course on ru_RU locale, maybe on CJK locales it's different, but it would be really weird. I mean locale contains an encoding, in most cases on linux it's UTF-8, and some info regarding numbers and such. I doubt it contains requirements regarding sizes of the box drawing characters.
In UTF-8, there are ambiguous spec. See here: http://www.unicode.org/reports/tr11/
And https://github.com/mattn/go-runewidth this can get asian width.
I see, well, as usual things are a mess. Patches are welcome, both to godit and termbox. Regarding this pull request as I said, make it complete and I'll merge it.
Frankly, I don't use godit and termbox much anymore.
I'm working on a C++ project using Qt Creator as a main editor right now, even wrote a plugin for it: https://github.com/nsf/emacskeys (it's not the most recent version though, I'm working on merging it to their git repo, or will be doing binary releases after 3.1 release). And other than that I just use emacs. :) Godit is still nice when you quickly need to get a fully functional text editor without installing emacs.
Frankly, I don't use godit and termbox much anymore.
Me too. I'm vimmer. :) But godit is great. My friend was impressed and surprised when he saw godit for the first time.
Maybe one day termbox will work fine on all locales. Right now I don't think it's realistic (even if it happens to work in some cases). Closing the pull request. As for godit, let's leave it as is for now.
─
is single cells in english locales, but in asia locales, it is two cells.