#77 Better unicode/UTF-8 support

已关闭
nuclearkev1 年之前创建 · 4 条评论

Most of the basic stuff works but combining chars doesn't work all the time. There are also some emojis that cause troubles. All combining emojis don't work (and I don't care). I'd like these to get fixed eventually because I have ran into some issues with emojis.

... It also bothers me that things aren't totally right...

Most of the basic stuff works but combining chars doesn't work all the time. There are also some emojis that cause troubles. All combining emojis don't work (and I don't care). I'd like these to get fixed eventually because I have ran into some issues with emojis. ... It also bothers me that things aren't totally right...

Turns out the issues lies in termbox. If you have something on the same line as a multi-byte unicode character that has a different color foreground it will render weird. My guess is there is something goofy with the cellbuf still need to look into this more.

Turns out the issues lies in termbox. If you have something on the same line as a multi-byte unicode character that has a different color foreground it will render weird. My guess is there is something goofy with the cellbuf still need to look into this more.

There is another issue at hand as well. The gap buffer assumes that each item in the buffer is only a byte, therefore, the unicode support is really a hack and doesn't actually work right. The real solution to this may be to change the gap buffer to use uint32_t instead of char_t. This would allow for any unicode (within 32 bit) to be used as a single point in the gap buffer. The way things are now, that is impossible.

There is another issue at hand as well. The gap buffer assumes that each item in the buffer is only a byte, therefore, the unicode support is really a hack and doesn't actually work right. The real solution to this may be to change the gap buffer to use `uint32_t` instead of `char_t`. This would allow for any unicode (within 32 bit) to be used as a single point in the gap buffer. The way things are now, that is impossible.

#37

#37
Kevin "The Nuclear" Bloom 在代码提交 1 年之前 中引用了该工单

This issue was aimed at displaying issues. Displaying issues have been fixed except for issues with the UTF-8 204 (decimal) character which causes some weird behavior in termbox. I won't fix that for now. There are still editing issues with combined UTF-8/unicode characters, however.

This issue was aimed at displaying issues. Displaying issues have been fixed except for issues with the UTF-8 204 (decimal) character which causes some weird behavior in termbox. I won't fix that for now. There are still editing issues with combined UTF-8/unicode characters, however.
登录 并参与到对话中。
正在加载...
取消
保存
这个人很懒,什么都没留下。