Re: Code Page problem in SetWindowText



That's a really good point. I hadn't thought of that before. So I guess if you are moving strings in and out of controls a lot there could even be a performance improvement using Unicode.

Tom

"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:8dGDi.1727$Sd4.669@xxxxxxxxxxxxxxxxxxxxxxx
"Tom Serface" <tom.nospam@xxxxxxxxxxxxx> wrote in message news:ebx6JG97HHA.3940@xxxxxxxxxxxxxxxxxxxxxxx
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.


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. But I've not done speed tests.

-- David



.



Relevant Pages

  • Re: How to check variables for uniqueness ?
    ... characters is the sequence SS. ... is simply capitalizing strings. ... The fact that case mapping in English /is/ simple is neither here not ... That is a fair criticism of the Unicode position. ...
    (comp.lang.java.programmer)
  • Re: Dangerous behavior of CString
    ... If I'm reading a data file or serial port or something, if the raw data are multibyte but the compilation is Unicode or vice-versa, then sometimes the converting constructors in CString are convenient. ... I did not actually write code like this; in fact I was pretty careful always to use the _T macro with any literal strings. ... But it does the conversion using the current 8-bit code page, which is not what I want. ...
    (microsoft.public.vc.mfc)
  • Re: Help please
    ... i would like to provide "CSimString" class code because the settings ... I agree with Tom that first step is project clean and rebuild all. ... with a Unicode string, ... Consider that VS2005 strings are Unicode by default, ...
    (microsoft.public.vc.mfc)
  • Re: passing a string to a dll
    ... bool DLLRect::PullWhisker ... The interface for the DLL exported function could be like so: ... based on _UNICODE flag, e.g. ... I think that in these days those ANSI strings are something from the ...
    (microsoft.public.vc.mfc)
  • Re: Will Multibyte app work for Chinese users?
    ... Make sure there are no instances of native-languages strings anywhere in your source code ... I've not done Chinese (our products are distributed in Europe, so right now I only have ... Introducing mbcs is going to vastly more difficult, because a lot of what you implicitly ... unless you know Unicode won't work, ...
    (microsoft.public.vc.mfc)