Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to print Unicode characters on OnlineGDB C++ compiler?

+2 votes
asked Dec 1, 2020 by Narendran Karthikeyan (210 points)
All the solutions are mainly for Windows and OnlineGDB only has an example for Python. So, I just want to know if printing Unicode characters is possible in this online compiler? If so, please instruct on how to.

1 Answer

+1 vote
answered Dec 3, 2020 by Peter Minarik (84,720 points)

It seems to me all you have to do is enter \u before the Unicode sign of the character/symbol and it works fine:

printf("\u00A9\u00AE\u0418\u26D4"); // Copyright, Registered, Cyrillic character 'i', Stop sign
Output: ©®И⛔
commented Dec 4, 2020 by Narendran Karthikeyan (210 points)
I am sorry, I forgot to mention that I am attempting to print it with ncurses. I can't seem to figure out how to make printw output the Unicode symbol. I have set the locale to ALL.
Thank you in advance.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...