Extended ASCII characters

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Extended ASCII characters

跳至解决方案
3,176 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
927 次查看
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 项奖励
回复
2 回复数
927 次查看
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 项奖励
回复
928 次查看
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 项奖励
回复