Re: extended ascii
Re: extended ascii
- Subject: Re: extended ascii
- From: Chris Espinosa <email@hidden>
- Date: Tue, 12 Oct 2004 16:02:08 -0700
On Oct 12, 2004, at 3:36 PM, Markian Hlynka wrote:
I'd like to use some of the symbols in extended ascii, http://asciitable.com/
particularly the ones in the 178-255 range. But, I can't seem to make them print in xcode. Am I doing something wrong in my printfs (printf("\xb2 \170") ) or does xcode not support this?
Read that page carefully: "extended ASCII" is not a standard; the symbols there are the "most popular" interpretation of byte values > 127. Unfortunately it omits "...on Windows." Unix and Mac (and modern Windows) use something different.
The Terminal application interprets the UTF-8 character set. If you want to print the "¬" to the Terminal, print the UTF-8 string 0xc2 0xac, like this:
printf("%c%c\n", 0xc2, 0xac) ;
This will work in the Xcode console as well. The low-level debugger gdb does not understand UTF-8, so it can't show the characters you expect, but the consoles should work.
I found the UTF-8 character codes by using the Special Characters... item in the Edit menu, searching for the desired character (I found it in the Unicode Blocks Latin-1 Supplement area), and hovering over it. The tooltip gave me the UTF-16 and UTF-8 codes for it.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden