<p>ok so my issue is i have the string '\222\222\223\225' which is stored as latin-1 in the db.  What I get from django (by printing it) is the following string, 'ââââ¢' which I assume is the UTF conversion of it.  Now I need to pass the string into a function that 
does this operation: </p>

<pre><code>strdecryptedPassword + chr(ord(c) - 3 - intCounter - 30)
</code></pre>

<p>I get this error:  </p>

<blockquote>
  <p>chr() arg not in range(256)</p>
</blockquote>

<p>If I try to encode the string as latin-1 first I get this error:</p>

<blockquote>
  <p>'latin-1' codec can't encode characters in position 0-3: ordinal not
  in range(256)</p>
</blockquote>

<p>I have read a bunch on how character encoding works, and there is something I am missing because I just don't get it!</p>

Your first error 'chr() arg not in range(256)' probably means you have underflowed the value, because chr cannot take negative numbers. I don't know what the encryption algorithm is supposed to do when the inputcounter + 33 is more than the actual character representation, you'll have to check what to do in that case.
About the second error. you must decode() and not encode() a regular string object to get a proper representation of your data. encode() takes a unicode object (those starting with u') and generates a regular string to be output or written to a file. decode() takes a string object and generate a unicode object with the corresponding code points. This is done with the unicode() call when generated from a string object, you could also call a.decode('latin-1') instead.
```
```
>>> a = '\222\222\223\225'
>>> u = unicode(a,'latin-1')
>>> u
u'\x92\x92\x93\x95'
>>> print u.encode('utf-8')
ÂÂÂÂ
>>> print u.encode('utf-16')
ÿþ
>>> print u.encode('latin-1')

>>> for c in u:
...   print chr(ord(c) - 3 - 0 -30)
...
q
q
r
t
>>> for c in u:
...   print chr(ord(c) - 3 -200 -30)
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ValueError: chr() arg not in range(256)
```
```