title: Getting char value in Delphi 7
body: <p>I am making a program in Delphi 7, that is supposed to encode a unicode string into html entity string.
  For example, "<code>ABCģķī</code>" would result in "<code>ABC&amp;#291;&amp;#311;&amp;#299;</code>"</p>
  
  <p>Now 2 basic things:</p>
  
  <ol>
  <li>Delphi 7 is non-Unicode, so I can't just write unicode chars directly in code to encode them.</li>
  <li>Codepages consist of 255 entries, each holding a character, specific to that codepage, except first 127, that are same for all the codepages.</li>
  </ol>
  
  <p>So - <strong>How do I get a value of a char, that is in 1-255 range?</strong></p>
  
  <p>I tried <code>Ord(Integer)</code>, but it also returns values way past 255. Basically, everything is fine (A returns 65 an so on) until my string reaches non-Latin unicode.</p>
  
  <p>Is there any other method for returning char value? Any help appreciated</p>