You appear to be running the code in a Windows console. The console doesn't use UTF-8, it uses a code page, probably code page 437. If you decode it with 'cp437' you should get the proper Unicode, or better yet use sys.stdin.encoding
to always get the proper console encoding.
var = raw_input().decode(sys.stdin.encoding)
Edit: a little experimentation shows that sys.stdin.encoding
returns None
when you redirect the input. A more robust solution:
# get correct encoding and use it to decode user input
encoding = 'utf-8' if sys.stdin.encoding in (None, 'ascii') else sys.stdin.encoding
var = raw_input().decode(encoding)