Thread: No one Knows About AnsiStrings

  1. #1

    No one Knows About AnsiStrings

    This is my third request in last few hrs looks like no one knows about ansiStrings.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    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.

    My best code is written with the delete key.

  3. #3
    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.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 0xc0000005 error
    By Hankyaku in forum C++ Programming
    Replies: 32
    Last Post: 03-14-2008, 04:20 PM
  2. Removing file extentions from ansistrings
    By JoeJTaylor in forum C++ Programming
    Replies: 5
    Last Post: 04-12-2006, 11:08 AM
  3. What am I doing wrong here?
    By Sam Granger in forum C++ Programming
    Replies: 10
    Last Post: 09-16-2005, 11:19 AM
  4. Output with AnsiStrings
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 04-23-2002, 05:25 PM
  5. AnsiStrings
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 04-23-2002, 02:49 PM