Questions tagged [ansistring]

An ANSI string is an array of 8 bit characters from the ANSI character set, a superset of the 7 bit ASCII character set, terminated by a binary zero. The ANSI string is primarily used in the C programming language and manipulated by a set of ANSI string functions provided by the C Standard Library. Most questions involving ansistring pertain to transformations to other character sets or other representations such as to UNICODE or std::string in C++.

54 questions
0
votes
1 answer

XE5 Ansi/Unicode-String Linker Errors (Unresolved Externals)

Getting many versions of the following linker error in XE5. [ilink32 Error] Error: Unresolved external '__stdcall System::UnicodeString::~UnicodeString()' referenced from From everything I've read so far, this seems like I have something…
SeaNick
  • 501
  • 1
  • 4
  • 14
0
votes
1 answer

ReadStr() and WriteStr() in Delphi

I have some code that uses ReadStr and WriteStr for what I presume is writing a string to a binary file. The explanation for WriteStr in the documentation states that it will write raw data in the shape of an AnsiString to the object's stream,…
Mewa
  • 502
  • 1
  • 9
  • 24
0
votes
1 answer

Strange issue when using AnsiString as key in map

I have a map map When I try to look up values in the map I use a string I have received from a TMemoryStream and send it to a Foo* GetFoo(AnsiString) function that in turn creates an iterator and returns the object found. This…
inquam
  • 12,664
  • 15
  • 61
  • 101
0
votes
2 answers

Diffence with AnsiString and AnsiString transfered from UnicodeString in C++ builder

I am using C++ Builder XE3 and I have met a weird problem with AnsiString. Just look at below code //Code 1: first time AnsiString temp1 = "test" ; funcA(temp1,temp1); //Code 2: second time String uTemp2 = "test"; AnsiString temp2 =…
Willy
  • 1,828
  • 16
  • 41
0
votes
1 answer

Should DbType.AnsiString or DbType.String be used?

I am looking at code written by someone else. Everywhere it uses DbType.AnsiString instead of DbType.String. Why?
CJ7
  • 22,579
  • 65
  • 193
  • 321
-1
votes
2 answers

Delphi - AnsiString Not Equal but dont know why

I have a comparison operator for a Tree iteration. It uses AnsiString variables. My issue is that when the values appear to be equal, I am not getting an equal indicator (aka not getting 0 from System.AnsiStrings.CompareStr). I have looked at my…
user1009073
  • 3,160
  • 7
  • 40
  • 82
-2
votes
1 answer

How to find out char code for a character of an Ansistring

In older versions of Delphi, like D7, you could do like ord(s[i]) where s was a string, but trying this with an AnsiString results in an exception (access violation). P.S. I was w/delphi 7 for a long time. Here are the steps to reproduce the…
Gonzalez
  • 681
  • 1
  • 11
  • 21
-2
votes
1 answer

FPC exitcode 201 while using ansistring. String does not do that

I have a question. I wrote this little program and it was working perfectly, until I changed s and s2 from string to ansistring. I need to use ansistring, because it will be way longer than 255 characters. Thanks for your response. {$H+} program…
-4
votes
2 answers

C++ Builder: Convert binary code to AnsiString

when I have binary code like '01010100011001010111001101110100", how can I convert this back to "test"? Thanks.
1 2 3
4