I have my own D6 pas library with crypto functions. Today I tried to use it under XE3, and I found many bugs in it because of unicode. I tried to port to AnsiString, but I failed on chr(nnn) which was 8 bit limited under Delphi6.
I'm trying to explain the problem:
Str := chr(hchar);
AStr := Str;
Str - string; AStr - ansistring.
When the hchar was 216 (diamater), then AStr changed to "O", what is Ascii 79... And I lost the original value at this moment.
Is there any function for Ansi Chr? For example: "AChr(xxxx)"
Or I need to change my code to not use Strings in the inner section, only bytes and later convert these bytes to AnsiString?
Thanks for any suggestion, help, info!
dd