title: Convert character from UTF-8 to ISO-8859-1 manually
body: <p>I have the character "ö". If I look in <a href="http://www.unicodetools.com/unicode/codepage-utf8.php" rel="nofollow">this UTF-8 table</a> I see it has the hex value <code>F6</code>. If I look in the <a href="http://www.tamasoft.co.jp/en/general-info/unicode.html" rel="nofollow">Unicode table</a> I see that "ö" has the indices <code>E0</code>and <code>16</code>. If I add both I get the hex value of the code point of <code>F6</code>. This is the binary value  <code>1111 0110</code>.</p>
  
  <p>1) How do I get from the hex value <code>F6</code> to the indices <code>E0</code> and <code>16</code>?<br>
  2) I don't know how to come from <code>F6</code> to the two bytes <code>C3</code> <code>B6</code> ...  </p>
  
  <p>Because I didn't got the results I tried to go the other way. "ö" is represented in ISO-8859-1 as "Ã¶". In the <a href="http://www.unicodetools.com/unicode/codepage-utf8.php" rel="nofollow">UTF-8 table</a> I can see that "Ã" has the decimal value <code>195</code> and "¶" has the decimal value <code>182</code>. Converted to bits this is <code>1100 0011 1011 0110</code>.</p>
  
  <p><strong>Process:</strong></p>
  
  <ol>
  <li><p>Look in a <a href="http://www.tamasoft.co.jp/en/general-info/unicode.html" rel="nofollow">table</a> and get the unicode for the character "ö". Calculated from the indices <code>E0</code> and <code>16</code> you get the Unicode <code>U+00F6</code>.  </p></li>
  <li><p>According to the algorithm posted by wildplasser you can calculate the coded UTF-8 value <code>C3</code> and <code>B6</code>.</p></li>
  <li><p>In the binary form you get <code>1100 0011 1011 0110</code> which corresponds to the decimal values <code>195</code> and <code>182</code>.</p></li>
  <li><p>If these values are interpreted as <a href="http://www.unicodetools.com/unicode/codepage-utf8.php" rel="nofollow">ISO 8859-1</a> (only 1 byte) then you get "Ã¶".</p></li>
  </ol>
  
  <p>PS: I found also <a href="http://www.utf8-chartable.de/" rel="nofollow">this link</a>, which shows the values from step 2.</p>