|
string literal - character code |
clovekx
Member #3,479
April 2003
|
How to insert a character into the string by the characters numeric code? this works: printf("%c",0x81); but these dont: What's wrong with them? I'm using mingw. EDIT: Now I see it works with standard printf, but doesnt with texprintf_ex, because char is signed and the value 0x80 is negative. --- |
Andrei Ellman
Member #3,434
April 2003
|
Are you trying to print the Euro sign? While it's position in the Windows-1252 encoding is 0x80, it's position in the ISO 8859-15 is 0xA4. As for Allegro's texprintf_ex(), Allegro uses UTF-8 by default, which means that unless you change the text-encoding format with set_uformat(), you must specify character constants in UTF-8 format. AE. -- |
GullRaDriel
Member #3,861
September 2003
|
Little help: set_uformat( U_ASCII ); Beaten ... I should take less time speaking of hdd's with HoHo ;-p "Code is like shit - it only smells if it is not yours" |
clovekx
Member #3,479
April 2003
|
Thanks. Setting uformat works. --- |
Tobias Dammers
Member #2,604
August 2002
|
Always does. --- |
|