ARM Technical Support Knowledge Articles

WIDE CHARACTER SUPPORT

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

I must implement UNICODE using Wide Characters in C. I noticed that in STDLIB.H in the INC directory the following is defined:

#ifndef _WCHAR_T_DEFINED_
#define _WCHAR_T_DEFINED_
typedef char wchar_t;
#endif

Shouldn't wchar_t be defined as an unsigned int or and unsigned short?

ANSWER

Yes. It probably should. However, the Keil C166 Compiler does not support wide characters.

The tools do not use this data type, so you are free to change it to whatever suits your needs. Note that printf and the other library routines do not support wide characters. So, you'll have to write your own routines to provide that support.

We may incorporate wide character support in future releases of the tools.

MORE INFORMATION

Article last edited on: 2005-07-15 14:06:49

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential