p-ranav / tabulate

Table Maker for Modern C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why it cannot run correctly in windows os?

meiko-rkc opened this issue · comments

I find that it can run correctly in linux terminal.

anybody can help me

Hello. Please provide a clear reproducible example - some snippet of code that I can run.

Detail what exactly doesn't work and how I can reproduce the issue.

If it is already reported in a different issue, then this would be considered a duplicate.

What compiler are you using? What version of tabulate are you using?

Please provide clear details when you open issues - otherwise, it is hard to provide any support.

@p-ranav
I have used the MSVC compiler and MinGW compiler. Only the Windows platform has the following problems:

  1. Some special characters, such as {"ᛏᚺᛁᛊ ᛁᛊ ᚨ ᛊᛏᛟᚱy ᛟᚠᚨ ᛒᛖᚨᚱ ᚨᚾᛞ\n"}, cannot be displayed on the Windows console. Garbled characters are displayed.
  2. Functions such as bold fonts, underline characters, and blinking characters cannot be implemented.
    The test code I used was the test code you provided.

And when I ported the code to the linux operating system, compiled and run, there was no such problem. On the one hand, I know that the Linux console uses UTF-8 encoding by default and Windows uses ANSI, and when I change the Windows console encoding format to UTF-8, the above special characters still cannot be displayed.

you provided

CMakeList.txt
image

this is the running result
image

no underline and cannot display the special character.

There are a number of pages online regarding how to change Windows cmd settings in order to view unicode characters. I'd suggest that you look through these documents to figure out how to change (1) font, e.g, Lucida Console, (2) console code page, to be able to print and see unicode characters.

This is imo more of a problem with Windows defaults for its command line and has less to do with tabulate.

If it's only a coding problem, why can't underline and blink on windows os? Are these also coding issues?Although I find that some problem can be solved by changing the code page and true type front.