Switching from Multibyte to Unicode
Posted: 2019-08-12 10:48
As result of a deep dive in hMailServers C/C++ Code, i found a series of functions and datatype favoring MBCS (Multibyte)
for example the Namespace HM:String which is defined as ANSI String.
I found this interesting read in Jeffrey Richters book Windows via C/C++ 5th on Page 15
We should just stick to Unicode and as result of it we gain some speed on all String Operations and the overall
code base should decrease without loosing any features.
for example the Namespace HM:String which is defined as ANSI String.
I found this interesting read in Jeffrey Richters book Windows via C/C++ 5th on Page 15
I think in 2019 we don't need any ANSI and Multibyte Code anymore and should remove it.Since Windows NT, all Windows versions are built from the ground up using Unicode. That is, all
the core functions for creating windows, displaying text, performing string manipulations, and so
forth require Unicode strings. If you call any Windows function passing it an ANSI string (a string
of 1-byte characters), the function first converts the string to Unicode and then passes the Unicode
string to the operating system. If you are expecting ANSI strings back from a function, the system
converts the Unicode string to an ANSI string before returning to your application. All these con-
versions occur invisibly to you. Of course, there is time and memory overhead involved for the system
to carry out all these string conversions.
We should just stick to Unicode and as result of it we gain some speed on all String Operations and the overall
code base should decrease without loosing any features.