nsf / godit

A very religious text editor
MIT License
578 stars 76 forks source link

render ASCII on windows #18

Closed mattn closed 9 years ago

mattn commented 9 years ago

As you know, on windows, there are some unicode points that doesn't render correctly. For example, east asian ambiguous width. It is not a problem of godit. Not a problem of termbox-go. it is a problem of ambiguous character widths. so i want to suggest to use ASCII characters for rendering borders on windows.

Before

After

Currenly, this is ugly patch. if you want this change, I'll update.

nsf commented 9 years ago

I agree with you that it's an issue, but how about simply using ASCII everywhere? I don't really like these big if statements you did there. I mean it looks good enough with just ASCII, I can live with that on linux too.

I'll do the conversion myself, it's not hard at all.. Will do it tomorrow for sure. But thanks for the idea, yeah.. it's a good idea.

nsf commented 9 years ago

Done: https://github.com/nsf/godit/commit/51c0dc2c3bd9a5033e

mattn commented 9 years ago

Thanks!

FYI, one more this. https://github.com/nsf/tulib/blob/master/buffer.go#L173 This is also ambiguous width character.

nsf commented 9 years ago

What should I replace it with? :) Maybe '~'?

nsf commented 9 years ago

Replaced the unicode ellipsis with '~'. It is used in other popular apps like Far Manager or Midnight Commander for that role.

mattn commented 9 years ago

it works fine. thank you