-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to format special characters correctly? #44
Comments
|
Ok. Maybe I need some information about how those characters are printed. Can it be, that there are utf8-characters that actually take up two spaces in a mono-font text? |
Prettytables uses the However, even the I'm not exactly sure what's the right thing to do here. I didn't know that unicode was such a mess. |
This is super annoying.
Comfy-table's whole internal logic operates under the assumption, that a single utf-8 character is actually displayed as a single character. In most cases, this won't be a problem. However, it gets super messy in some edge-cases.
As a result, the property-testing with I need to think about this. We might have to do some internal refactoring to properly handle these issues. |
The linked PR already fixes your issue, but the internal issues aren't addressed yet. |
Some broken things found by Proptest:
|
thank you very much, recently I am a loyal user of comfy-table |
Ok.
Defaulting to a multi-character column in this case would be in direct conflict with the user's wish to have a single-character column. I don't think this case should be handled. If the user requests it, they should get it.
Checking if we should default to a multi-character column in the second case will be quite a lot of work, as the whole width-calculation algorightm has to be adjusted and this is quite a bit of complex code. As I'm not sure on how to properly do that, this issue will be fixed in a future version. |
You are right. Thank you for your work. |
Closing this in favor of a more specific follow-up issue :) Thanks again for reporting! |
databendlabs/databend#1323
preset:
table.load_preset("||--+-++| ++++++");
The text was updated successfully, but these errors were encountered: