<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Jeremy,<br>
<br>
the two problems I found were to do with char and accessing
string[0].<br>
<br>
string[0] : I ended up doing a global search through the whole
app for [0] and fixed every one of them.<br>
char : unless you are careful, I found that even though the code
compiles, it does the wrong thing to what you expect - I had to
inspect each usage of char and sort its type.<br>
<br>
I have CRC routines. I am still using shortstring in them. And
the unit testing passes.<br>
<br>
Rohit<br>
<br>
On 16/11/2016 10:00, Jeremy Coulter wrote:<br>
</div>
<blockquote
cite="mid:CAGYhmGhuO+_BDgpOcdtjCiGVQnmAEbygCZ3cMHL_kyMPogftmQ@mail.gmail.com"
type="cite">
<div dir="ltr">HI all.
<div>I have a Delphi 2007 application that I NEED to upgrade to
Delphi XE 8 or greater.</div>
<div>The problem is, I am having trouble converting the code due
to the fact that Embarcadero changed how "String" etc. is used
when they added the support for Unicode.</div>
<div>I have had a couple of cracks at the conversion and I am
"close" on one project but I am starting again because I want
to make sure I am using the right variable types and not
guessing.</div>
<div>There is a bit of MD5 conversion going on and the different
variable types of course generated diff MD5 codes for the same
string being converted and it is a bit confusing :-)</div>
<div><br>
</div>
<div>The main variable types are:</div>
<div><br>
</div>
<div>String</div>
<div>Byte</div>
<div>Integer</div>
<div>LongInt</div>
<div>Pointer</div>
<div>Array of Char</div>
<div>PChar</div>
<div>Char</div>
<div><br>
</div>
<div>My understanding is the variables should now be :-</div>
<div><span style="background-color:rgb(255,0,0)"><br>
</span></div>
<div>
<div><font style="background-color:rgb(243,243,243)"
color="#ff0000">String = AnsiString?</font></div>
<div><font color="#ff0000">Byte = Still Byte?</font></div>
<div>Integer = Still Integer</div>
<div>LongInt =Still LongInt</div>
<div>Pointer = Still Pointer</div>
<div><font color="#ff0000">Array of Char = PAnsiCHAR ?</font></div>
<div><font color="#ff0000">PChar = PAnsiChar?</font></div>
<div><font color="#ff0000">Char = AnsiChar?</font></div>
</div>
<div><font color="#ff0000"><br>
</font></div>
<div><font color="#000000">Am I correct with the above that I
have highlighted in "Red" ??</font></div>
<div><font color="#000000"><br>
</font></div>
<div><font color="#000000">Thanks, Jeremy</font></div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
</blockquote>
<p><br>
</p>
<div class="moz-signature">-- <br>
<p>
Regards<br>
<br>
<b>Rohit Gupta</b><br>
B.E. Elec., M.E., Mem IEEE, Mem IET<br>
Technical Director<br>
Computer Fanatics Ltd<br>
<br>
<b>Tel </b>4892280 <br>
<b>Fax </b>4892290 <br>
<b>Web </b><a href="www.cfl.co.nz">www.cfl.co.nz</a><br>
</p>
<hr>
This email and any attachments contain information, which is
confidential and may be subject to legal privilege and copyright.
If you are not the intended recipient, you must not use,
distribute or copy this email or attachments. If you have received
this in error, please notify us immediately by return email and
then delete this email and any attachments.</div>
</body>
</html>