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

Parents
  • 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.

Reply
  • 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.

Children