Closed Yuan-Quan closed 1 year ago
I wrote 😑😑😭 in code, but the output is ���😑😭😭. This is not an issue of ConsoleTables. WriteLine("😑😑😭"); output this, too.
This is a known issue with emoji rendering. I've run into it myself. Some emojis have an additional space, while others don't. It's almost impossible to determine how much space they will take up. :(
好耶! 原来已经有人在我之前提出这个问题了. 不过我给出解决方案哦~ (暴力获取每个字符的宽度, 然后保存到字节数组, 作为项目的嵌入资源. 每一个字符仅占1bit. 或者用其他的判断). 完整文章: CSDN: 计算字符串在控制台中的宽度
WOW! I just noticed that you have submit the same issues as mine. but I have a method which can solve this issues. (enumerate every char, get it's width, then save the result to a byte array, write to a file, and specify this file as project resource. one char will only take one bit in this file. the other solution which not require a resource file, is to use a lot of "if".) an article about this solution: CSDN: To calculate the width of string in console
Now it's simple. Make a separate package and add reference to it. Or simply copy and paste them here.
I believe this issue has been solved with the latest release of 2.5.1
. Cheers.
If any Chinese, Japanese, emoji character appeared in the table, it won't display properly.
Steps to reproduce the problem:
add some non-English letters in the table
Excepted behavior:
Actual behavior: