Re: [Dev-C++] re: French diacritical marks
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Brian M. <str...@ho...> - 2002-03-23 15:01:22
|
>From: Keith Alexander <ka...@co...> >Reply-To: Keith Alexander <ka...@co...> >To: dev-cpp list <dev...@li...> >Subject: [Dev-C++] re: French diacritical marks >Date: Sat, 23 Mar 2002 00:31:59 -0500 > >Hi, > > My first posting to a list I've been "lurking" on for a while, and am >enjoying very much. > > Not positive how to print out a single character in C++, using its >ASCII code, but I'm pretty sure this is what you want (like the CHR$ >function in BASIC). I can't supply the correct C++ usage (it's probably >something disgustingly simple), but here are the characters and their >corresponding decimal and ASCII codes. For example, I inserted them in this >e-mail using the Alt key while punching in the decimal code on the number >pad. > >é = 130 dec. (82 Hexadecimal ) >à = 133 dec. (85H) >è = 138 dec. (8AH) >á = 160 dec. (A0H) >ç = 135 dec. (87H) >ê = 136 dec. (88H) >É = 144 dec. (90H) >î = 140 dec. (8CH) >ë = 137 dec. (89H) >â = 131 dec. (83H) >ô = 147 dec. (93H) >û = 150 dec. (96H) >í = 161 dec. (A1H) >ó = 162 dec. (A2H) > >Here are some others (not necessarily French): > >ü = 129 dec. 81H >ä = 132 dec. 84H >å = 134 dec. 86H >ï = 139 dec. 8BH >ì = 141 dec. 8DH >ö = 148 dec. 94H >Ü = 154 dec. 9AH >£ = 156 dec. 9CH >¥ = 157 dec. 9DH >½ = 171 dec. ABH >¼ = 172 dec. ACH There are two ways to display the character you want using the ASCII code. cout << '\xA0'; and cout << char(160); display the same thing, 'á'. cout << '\x9A'; and cout << char(154); display 'Ü', and so on. just use '\x<hexidecimal code number>' or char(<decimal code number>) to display a special character. If you want to store a string of characters, i would guess you need to do it character by character in a string. > > Hope this helps! > >Keith Alexander >Detroit, MI _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |