Quote Originally Posted by Arjay View Post
While you *can* have both ANSI and UNICODE in a single program, I'd recommened that you compile your program for all UNICODE. If you have data coming in (or going out) that's then convert the data to UNICODE immediately so it's in one format throughout your program.

The main reason for doing this is that the Windows Operating System uses UNICODE internally and any ANSI calls you make, convert the strings to UNICODE and then just call the UNICODE version of the api. So there is extra overhead while interacting with the OS if your program is primarily in ANSI.
Well i did not know that, thought it may have been the other way round.


Iv recompiled my program now, after about 500 edits ;-) and is working, but...
Im getting some strange comparison results.

I have a pretty low level text comparator that also does a little parsing on some of the input.
Dotted throughout the comparator is code like the following:


if( temp[pos] == 'p' || temp[pos] == 'P' ){

Is it necessary for me to prefix _T() or L on character literals too?

Also need to detect some control codes and whitespace characters so also have


while( pos < total && ( temp[pos] < 33 || temp[pos] > 126 ))


I suspect now these are causing me problems as not comparing like with like?

Can anyone clarify this issue?

Thanks for everyones help.