Board index » cppbuilder » Wrong Character when casting and int to char

Wrong Character when casting and int to char

    I need to cast an int, say 129 or any other extended character, to a
char and display it in a Memo or Edit component. When I do this I often get
a vertical bar which is not the ASCII character for the given number. I
notice in the system font that these are in fact vertical bars and I am
guessing that this is where the character representation is being retrieved
from.

    Can anyone tell me how to get the actual character representation for
display?

Thanks for any help.

 

Re:Wrong Character when casting and int to char


Quote
> Can anyone tell me how to get the actual character representation for
> display?

This is not an IDE issue. This newsgroup section (.IDE) is for
questions relating to the IDE (the Editor, De{*word*81} etc) as the name
implies.

Your question would be best asked in either:

  .VCL.COMPONENTS.USING - if you are using VCL components
or
  .NATIVEAPI - if you are using the Windows API.

Borland newsgroups are described at:
http://info.borland.com/newsgroups

Guidelines:
http://info.borland.com/newsgroups/guide.html

Etiquette:
http://info.borland.com/newsgroups/netiquette.html

--
Andrue Cope
[Bicester, UK]

Team Thai Kingdom

Other Threads