This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: _TCHAR



Am 10.05.2006 um 20:07 schrieb Andrew Lunn:


On Wed, May 10, 2006 at 07:13:33PM +0200, Lars Poeschel wrote:
Hello!

In ecos/host/tools/Utils/common/wcharunix.h
_TCHAR is typdef'd as char. Shouldn't it be wchar_t for unicode builds ?
Is wcharunix.h only included in unix-builds or does Windows use it also

I know very little about unicode, so please ignore what i say....

I do not do that, because you have an interesting idea! ;-)


I think wcharunix.h needs remove altogether. The wxWidgets wxchar.h
and the system <wchar.h> should be used.

I think, this is not possible very easily because many Files outside the wx configtool depend on functions where aliases are defined in wcharunix.h such as _tprintf are #define'd here and allow us to use wprintf in unicode builds and printf for ansi builds.
I think that should stay here (maybe change the name of the file to someting more descriptable in that case). But to remove the TCHAR defines and typedefs here and use system/wxWidgets' instead is not the worst idea! From the programmers point of view this can make things much easier, since unicode support of wxWidgets seems very good to me and I could save much of the wchart_t <-> char conversion for library functions where GNU does not provide wide character versions.
But the other side is, that we would possibly have depencies on wxWidgets in non gui-programs or libraries such as the command line config tool.What do you think ? Should I take the step and rely on wxWidgets ?


Lars


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]