This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Extended Ascii characters - Keil

Hello,

I am trying to implement the extended ASCII characters found on:

www.asciitable.com/.../extend.gif

But it appears as though the default extended ASCII characters are:

http://www.ascii-code.com/

Is there any way to change this?

- Thanks,
Jordan

  • Not sure what you mean by "implement".

    The C language don't have any keywords with extended characters. But you can use them in comments or strings.

    But if you have a string with extended characters, that string will not matter much to the compiler. It's first when you print the string that the device you print it to that will start to care.

    So if you print on a serial port, it's the software processing the data on the other side that may care. If you print to a LCD, it's the character set in the display that cares.

    If you find an editor that have selectable character sets, where you can specify a code page to use, you can edit your files and "draw" boxes etc using the graphical characters of that code page. The compiler will not mind. It's just that the Keil IDE will not display the source code with the same characters mapped.

    Next thing is that if you install a custom font, you could have Keil use this font for the editor - the editor don't know what a character looks like. It just select a font and then have Windows convert from character number into a bitmap for the display memory. So it's possible to have a font that lies and maps different characters between 128..255 instead of the Windows-1252 character set that Windows thinks is mapped there.

    But once more - for this to actually matter, you need that character set in the output device of your send your printouts to.

  • I hope this image better explains what I am trying to accomplish:

    dl.dropbox.com/.../Image2.jpg

    It's displaying "É" (0xC9) When I want it to display 'ALT + 201' (Character doesn't print out when I preview my post)

    If there is a way to change this, would you be able to give me steps to do so?

    Thanks

  • Try installing a fixed-pitch font that has the old "OEM" PC character set making your Windows installation believe that the font is using the Windows-1252 character set.

    Then all Windows that supports selection of this font, will draw frame borders.

    Maybe you can buy this one:
    www.ascenderfonts.com/.../Courier-Line-Draw-Regular.aspx
    Or see if you can use MS linedraw.ttf

    Obviously, your employer may hate you if you check in code explicitly writetn for the OEM character set while you claim the source code is actually Windows-1252.

    Or get a copy of one of the free TTF fonts available that contains the 437 code page and modify the font to claim it's the standard Windows-1252 character set.

  • Thanks for your help but I have decided to stick with the default character set.

  • That seems the best thing to do - helps other developers who happens to want to open the source code.

  • Hmm yeah it's actually for a school project but it makes sense to not mess with it. Just wanted nice borders.