#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.
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.
登入 才能加入這對話。
正在加載...
取消
保存
尚未有任何內容