How to use symbols of extended ASCII table in C?

前端 未结 1 1340
盖世英雄少女心
盖世英雄少女心 2020-12-09 20:58

I\'ve been tried to print Extended ASCII characters:

http://www.theasciicode.com.ar/

But all those symbols were printed as ques

相关标签:
1条回答
  • 2020-12-09 21:21

    It's better to use unicode than extended ASCII, which is non-standard. A thread about printing unicode characters in C : printing-utf-8-strings-with-printf-wide-vs-multibyte-string-literals

    But indeed you need to copy paste unicode characters..

    A better way to start:

    #include <stdio.h>
    
    int main() {
        printf("\u2500\u2501\n");
    }
    

    See https://en.wikipedia.org/wiki/Box-drawing_character#Unicode for unicode characters for this extended ASCII style box art..

    0 讨论(0)
提交回复
热议问题