Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why it cannot run correctly in windows os? #106

Open
meiko-rkc opened this issue Aug 15, 2023 · 16 comments
Open

why it cannot run correctly in windows os? #106

meiko-rkc opened this issue Aug 15, 2023 · 16 comments

Comments

@meiko-rkc
Copy link

I find that it can run correctly in linux terminal.

@meiko-rkc
Copy link
Author

anybody can help me

@meiko-rkc
Copy link
Author

@p-ranav

@p-ranav
Copy link
Owner

p-ranav commented Aug 17, 2023

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.

@meiko-rkc
Copy link
Author

@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.

@meiko-rkc
Copy link
Author

@meiko-rkc
Copy link
Author

you provided

@meiko-rkc
Copy link
Author

CMakeList.txt
image

@meiko-rkc
Copy link
Author

this is the running result
image

@meiko-rkc
Copy link
Author

no underline and cannot display the special character.

@meiko-rkc
Copy link
Author

@p-ranav

@p-ranav
Copy link
Owner

p-ranav commented Aug 19, 2023

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.

@meiko-rkc
Copy link
Author

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.

@meiko-rkc
Copy link
Author

@p-ranav

@meiko-rkc
Copy link
Author

help!@p-ranav

@HtieDgh
Copy link

HtieDgh commented Sep 8, 2024

it happens when source code symbols in VisualStudio saved in different to utf-8 format and there are no Valhalla symbols. After compiling that symbols are interpreted like (?). My Console (cmd.exe) has CP866 encoding so (?) are printed. Try use another terminal/console or check the encodings of your source files and terminal/console you're using (they supposed to be the same).

@HtieDgh
Copy link

HtieDgh commented Sep 8, 2024

You can also resave your source code in diferent encoding, but then you need change the encoding in compiler settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants