From: Ajay Kalra on 12 Apr 2006 08:59 > Does anyone actually build applications for both Unicode and ANSI now? Even if you dont build apps for UNICODE and ANSI, its still a good practice to use T. Its especailly meaningful if you are building with ANSI as it will be easier to migrate to UNICODE if you choose to do so. This is coming from personal painful experience. --- Ajay
From: Tom Serface on 12 Apr 2006 10:15 I agree with Ajay. You may not think you need Unicode right now, but eventually you will as your product grows. It doesn't cost anything to use the macros except a little discipline. Tom "Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message news:1144846798.817346.220250(a)g10g2000cwb.googlegroups.com... >> Does anyone actually build applications for both Unicode and ANSI now? > > Even if you dont build apps for UNICODE and ANSI, its still a good > practice to use T. Its especailly meaningful if you are building with > ANSI as it will be easier to migrate to UNICODE if you choose to do so. > This is coming from personal painful experience. > > --- > Ajay >
From: Ajay Kalra on 12 Apr 2006 10:28 > "my string" ->> L"my String" Why? You add L only if you want a UNICODE string or you have a UNICODE build. Typical use for prefix L in MBCS builds is when using COM objects or some methods which take wide char strings. Otherwise you should not use it in MBCS. _T is a perfect choice. --- Ajay
From: Tom Widmer [VC++ MVP] on 12 Apr 2006 11:13 Tom Serface wrote: > I agree with Ajay. You may not think you need Unicode right now, but > eventually you will as your product grows. But in that case why not just use unicode from the start? Tom
From: Ajay Kalra on 12 Apr 2006 11:30 > But in that case why not just use unicode from the start? The short reason is wizards in VC++ prior to VS2005 generated MBCS code (in MFC). A large majority (if not all) never touched this setting. You had to make an effort to make it UNICODE. In VS2005, UNICODE is the default setting as opposed to MBCS in earlier versions, so you would expect it will be more popular. However, I am not sure why this was needed. People still like to use strcpy etc and suddenly they cannot use it anymore. I have used UNICODE for a very long time. I recently moved to a app which is few years old is MBCS and there are no issues. So I am not sure why should this be forced to everybody. Every project has different requirement, most of these are not UNICODE specific. My personal prefernce is to start with UNICODE so as to avoid this issue later on. But that does not mean others feel the same way. --- Ajay
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: ERROR_DLL_INIT_FAILED - HELP please Next: VC++ doesn't like sal.h AT ALL! |