Re: Unicode: char->TCHAR



>> Actually, BYTE in windows
>> platform is defined as char.

>I found that it resolved to unsigned char for both Unicode and
> non-Unicode builds.

Exactly - and that's what distinguishes it from TCHAR, which expands to
unsigned char or unsigned short depending on whether UNICODE is #defined or
not.

--
Guido Stercken-Sorrenti
MVP - Visual Developer / Visual C++


.



Relevant Pages

  • Re: TCHAR and buffer overflows
    ... This would be a problem if you hadn't defined UNICODE in your build. ... unsigned char *_mbsncpy(unsigned char *strDest, ... >> macro WCHAR was introduced to switch between ascii and unicode chars as ... > I think you mean TCHAR. ...
    (comp.security.misc)
  • Re: TCHAR and buffer overflows
    ... This would be a problem if you hadn't defined UNICODE in your build. ... unsigned char *_mbsncpy(unsigned char *strDest, ... >> macro WCHAR was introduced to switch between ascii and unicode chars as ... > I think you mean TCHAR. ...
    (comp.os.ms-windows.nt.admin.security)
  • support for unicode dead keys
    ... the current keyboard mapping code allows for unicode characters ... There is also a "compose" table which ... -static unsigned char handle_diacr ... +extern struct kbdiacruc accent_table; ...
    (Linux-Kernel)
  • Re: how to convert an unsigned short to an unsigned char?
    ... You are asking about some very basic C/C++ programming. ... chapter 1 or 2 of a C/C++ Programming book. ... CString to unsigned char -> really can't be done and doesn't make any sense. ... What I think you want to do is look into UNICODE. ...
    (microsoft.public.windowsce.embedded.vc)
  • RE: _TUCHAR / _TCHAR ?
    ... I believe the only difference is whether or not they will be sign extended if they are converted to a larger integer type. ... _TCHAR s; ... It probally isn't impotant with unicode, but the old char was often used for reading binary files. ... If you didn't use unsigned char you could end up with some unexpected values. ...
    (microsoft.public.dotnet.languages.vc)

Loading