Click here to Skip to main content
15,112,662 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone.
I want to print some characters I found in ASCII code,for example I want to print #187 from ASCII ,but I receive a this[^] as output.
I use ubuntu and in terminal I have encoding: Unicode UTF-8
What's wrong?

Thanks

What I have tried:

#include <stdio.h>

int main(void)
{
    unsigned char c = 187;
    printf("\n\n\n    %c   \n\n\n",c);
}
Posted
Updated 30-Sep-20 4:22am
Comments
Nick_is_asking 30-Sep-20 8:59am
   
Ok .I have to change it to Western IBM850
Rick York 30-Sep-20 12:10pm
   
What is "it" ?

1 solution

Decimal 187 is HEX BB. Is that actually the character that you want to print?
   
Comments
Nick_is_asking 30-Sep-20 9:33am
   
No,but thanks for your interest.I found it.
CPallini 30-Sep-20 10:12am
   
5.
Richard MacCutchan 30-Sep-20 10:20am
   
Thanks. But I still don't know what the problem is.
CPallini 30-Sep-20 10:21am
   
That's not relevant. :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900