Greetings,

I have occasionally wanted to create a Terminal program that uses Greek letters, superscript and subscript numbers and some scientific symbols. I found that this can easily be done using Unicode. Additionally, C and C++ handle Unicode as wide characters (wchar_t) and have many functions available for handling them. So, naively, I thought this would easily solve my problem and I could write my program. But I'm not so lucky. And thus began the 2020 Console Video project (COVID-20). (2020 because I started working on it in 2020). Very Happy

As anyone who has tried to use Unicode or wide characters in C or C++ will soon discover your Terminal will not display Unicode or wide characters correctly. It turns out that not only does displaying these characters properly depend on what OS you are using, it depends on what compiler you use. So I have created the single header "unicoder.h" that hides the dirty work from you by figuring out what OS (Windows or Linux) and compiler (see listing included in documentation) you are using and then setting things up so that you can display wide characters and Unicode easily. It also includes many definitions of Unicode characters for your convenience.

I have also added some features to Unicoder that let you turn on/off underline, bold fonts and color font/background.

On the off chance someone might be interested in using Unicode or wide characters you can find Unicoder here:
https://github.com/sthomasbradley/Unicoder
Putting a zip file of your source code in the repository (and nothing else) is an interesting abuse of version control. Since I can't be bothered to pick that apart, I have no further comments at this time.
Tari wrote:
Putting a zip file of your source code in the repository (and nothing else) is an interesting abuse of version control. Since I can't be bothered to pick that apart, I have no further comments at this time.


Thank you for your input. That was actually a mistake on my part when I uploaded the files.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement