Extended ASCII characters

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extended ASCII characters

Jump to solution
3,036 Views
FredF
Contributor III

I am using CW8.2.2 with IDE 5.6.1, and I need to use 8-bit ASCII characters beyond 0x7F.  However, there are inconsistencies between the way the IDE and the compiler represent the characters.  For example, if a capital C with cedilla 'Ç' is entered in the IDE using the traditional value 0x80, it is displayed properly.  When this character is compiled as part of a string, it is given the value 0xC7, which is a valid value using a newer extended ASCII table, but not the same as 0x80.  Is there a way to get the IDE and compiler to use the same extended ASCII table?

 

Thanks,

 

Fred

Labels (1)
Tags (1)
0 Kudos
1 Solution
787 Views
FredF
Contributor III

Thanks for the response, but I was able to resolve the issue.  In Windows with a full keyboard, holding the ALT key and entering 1-2-8 (0x80) on the keypad will produce Ç using the 8859 character set.  Holding the ALT key and entering 0-1-9-9 will produce Ç using the 8859-1 character set.  The compiler uses the 8859-1 character set, so creating strings with the 0-x-x-x codes produce the correct hex values when compiled.  However, the CW IDE does not recognize all the extended ASCII characters when they are entered, so an alternate editor may be required.  Once they are entered in the file, the IDE displays them correctly, and they are compiled correctly. 

 

Thanks,

 

Fred

View solution in original post

0 Kudos
2 Replies
787 Views
trytohelp
NXP Employee
NXP Employee

Hi,

 

There are 2 norms for extended ASCII table:

  - ISO-8859

  - ISO-8859-1 for Latin Europe.

 

We need more details when you said:

For example, if a capital C with cedilla 'Ç' is entered in the IDE using the traditional value 0x80, it is displayed properly.

How do you entered it in the IDE ?

 

What is the Windows OS used ?

Is it the US version ?

 

Do you have an example reproducing the behavior ?

 

Regards

Pascal

0 Kudos
788 Views
FredF
Contributor III

Thanks for the response, but I was able to resolve the issue.  In Windows with a full keyboard, holding the ALT key and entering 1-2-8 (0x80) on the keypad will produce Ç using the 8859 character set.  Holding the ALT key and entering 0-1-9-9 will produce Ç using the 8859-1 character set.  The compiler uses the 8859-1 character set, so creating strings with the 0-x-x-x codes produce the correct hex values when compiled.  However, the CW IDE does not recognize all the extended ASCII characters when they are entered, so an alternate editor may be required.  Once they are entered in the file, the IDE displays them correctly, and they are compiled correctly. 

 

Thanks,

 

Fred

0 Kudos