Author Topic: Heathcliff  (Read 26746 times)

0 Members and 1 Guest are viewing this topic.

CCRDude

  • Guest
Re: Heathcliff
« Reply #15 on: March 12, 2010, 02:39:18 am »
@axoduss: there is a download of just the binaries available... well, there should have been one on my homepage. Just noticed that it leads to a 404 page not found.

I'll try to re-upload asap!

@James: you're right :)

Delphi has a type "Char" (single letter) as well as the types "AnsiChar" (one byte) and "WideChar" (two bytes). Same for String and AnsiString vs. WideString (variable length). Up to version 2008 I think, Char was equal to AnsiChar, now it is WideChar. I must admit I created Heathcliff at a point where I didn't care about Unicode. Nowadays I add typecasting all over the place where I use OS APIs that need a special type, even though it sometimes looks a bit extrem, like PWideChar(WideString(AnsiString(mywar))) to convert zero-terminated ansi text to utf-16 text ;)

In this case, the problem is even a bit more clouded - since I used both String and Char only, Delphi 2010 should automatically use the Wide* variants, while older compilers should stay with the Ansi* variants. But Borland/CodeGear/Embarcadero added a special case: String[N], where N is a number, defines a string with a predefined length, and those are always ASCII, never WideString. So copying a Char into a String[N] does no longer work between compiler versions.

---

The fix: in lines 1912 and 1913, replace "of char" with "of AnsiChar".
Well, actually I should have used an array of bytes there anyway. And a stream class instead of old non-OO file access methods.

I uploaded the fixed code as revision 7.

Offline axoduss

  • Newbie
  • *
  • Posts: 3
  • Milliwatts: 0
    • View Profile
Re: Heathcliff
« Reply #16 on: March 13, 2010, 12:01:38 pm »
Well, I'm waiting for it :-)

CCRDude

  • Guest
Re: Heathcliff
« Reply #17 on: March 15, 2010, 04:40:43 am »
I've restored the binary files download at http://patrick.kolla.de/heathcliff.html now :)

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2024, SimplePortal