This is my third request in last few hrs looks like no one knows about ansiStrings.
This is my third request in last few hrs looks like no one knows about ansiStrings.
Or it could be your lack of patience in getting an answer. If you keep posting new threads with the same question or bumping your threads then you'll be met with brisk silence. But since I'm replying I might as well offer my suggestion. STFW, you'll find information all over the place with very little effort on your part, though effort seems to be something you avoid.
-Prelude
My best code is written with the delete key.
AnsiString - I assume we are talking Borland.
AnsiString is a proprietry equivalent (more or less) to the standard library string class.
Borland use it in C++ Builder because it is binary compatible with the Delphi (pascal) string type. They need to do this because C++ Builder uses the same VCL as Delphi does.
ANSI strings are non-Unicode strings. ANSI implies the the first 128 characters of the ASCII table. ANSI strings are char strings and are 8 bits wide per character.
Unicode strings are wide chars (wchar_t) and are 2 bytes long or 16 bits. Most Windows 98 functions require you to pass ANSI strings to the functions, but Windows 2000 requires you pass Unicode strings. The standard string functions in C run times will not operate on Unicode strings and require ANSI strings. There are several functions in Windows that can be used to deal with Unicode strings. For more information (this is a vast topic) and for addressing portability issues between platforms, consult the Platform SDK. Unicode is the best choice since it is supported worldwide (or will be when completed) and you will not have to re-code your app to distribute it in other countries.
I'm not familiar at all with how XP deals with strings, but I'm sure it is pure Unicode just like Win2K.