Re: Code Page problem in SetWindowText



Hi Mihai,

For the most part I agree with what you say here, the only exception being... if you are using a lot of strings and doing a lot of string handling and don't need anything except English then using MBCS may be a bit faster to execute, better in memory storage, and quicker to read and write files since Unicode doubles all character sizes whether needed or not. I wish Windows/MFC/all those good things had better handling for other methods like UTF-8 that would give similar results as MBCS.

That say, the differences in most cases are not all that significant and I've gone to using Unicode all the time.

Tom

"Mihai N." <nmihai_year_2000@xxxxxxxxx> wrote in message news:Xns99A27125F83BMihaiN@xxxxxxxxxxxxxxxx

I've created a MFC project in MBCS. I need to show some set special
characters ( ASCII code > 128) in a CStatic controls.

If you start now with a new project, there is no reason no to go Unicode.

The only reason for MBCS is to support Win 9x (with a new project?),
to learn about things that will be obsolete in 2-3 years,
or for being a masochist :-)


--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

.



Relevant Pages

  • Re: CString and UTF-8
    ... know how to work with those strings just fine. ... In this sense, CString does ... The only important sense in which CString "supports" MBCS ... It has conversion constructors from UTF-16 that use the local MBCS code ...
    (microsoft.public.vc.mfc)
  • Re: ANSI oder nicht ANSI?
    ... Zugriffe auf Zeichen innerhalb der Strings. ... Du brauchst eigentlich kein MBCS System, ... SET LeadBytes nicht gefüllt ist, ...
    (de.comp.lang.delphi.misc)
  • Re: Is there a Unicode equivalent to ASCIIZ Stings?
    ... I don't use MBCS any more, but CString did provide the correct lengths so ... But whatever that is, it should do it for wide strings also, ...
    (microsoft.public.vc.mfc)
  • Re: Code Page problem in SetWindowText
    ... So I guess if you are moving strings in and out of controls a lot there could even be a performance improvement using Unicode. ... I wish Windows/MFC/all those good things had better handling for other methods like UTF-8 that would give similar results as MBCS. ... But much of the inherent speed advantage of MBCS is negated by the native API in Win2K/XP/Vista being Unicode, so having a Unicode app allows us to call these API's directly and not go through thunks. ...
    (microsoft.public.vc.mfc)

Loading